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

Shane Duan shane.duan at gmail.com
Wed Jan 10 14:14:41 EST 2007

Coming up with new extension involves buy-ins from all the editors
(intelliJ, eclipse, vi, emacs), and major operation systems.  So I
really doubt it will take off.  Having the naming convention feels
like a good way to go.

As for the link provided, you just meant the naming convention, right?
 I learned to write it just following rspec's document.  Worked out
great for me, especially the rcov and rspec HTML report.

On 1/10/07, Rob Muhlestein <rob at muhlestein.net> wrote:
> 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
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list