[rspec-users] foo_spec.rb -> foo.rspec (proposed RSpec file name convention)

Rob Muhlestein rob at muhlestein.net
Wed Jan 10 13:31:24 EST 2007


Is it too late to suggest some filename conventions for example rspec
files--especially when bundling with gems? 

I see spec_foo.rb and foo_spec.rb around. Also found some foo_ex.rb
around. Would having a foo.rspec be worth talking about? Or is the
convention more or less to have 'spec' in the file name?

I have to confess the only real motivation I have at the moment is
syntax highlighting without adding RSpec DSL tags to ruby.vim (which I
went ahead and did anyway.) If acceptable as a published convention, we
could then recommend to editor projects.

Here's one link suggesting how to incorporate RSpec into rake and gems:

http://townx.org/running_rspec_as_a_rake_task

Personally I'd like so see this convention distilled enough to be
mentioned in the pickax "Creating Your Own Gems - Package Layout"
section (not to mention an entire additional section dedicated to
BDD to go with or replace the old asserts stuff).

Loving RSpec. You actually get work done while writing that spec doc any
PHB can understand, even if the application isn't written in Ruby.
Looking forward to using RSpec from JRuby to apply BDD to the legacy
Java stuff.

Regards,

-- 
Rob Muhlestein
http://rob.muhlestein.net



More information about the rspec-users mailing list