[rspec-users] Recognising RSpec files in the Textmate bundle

David Chelimsky dchelimsky at gmail.com
Sat Aug 7 18:44:33 EDT 2010

On Aug 7, 2010, at 5:28 PM, Ashley Moran wrote:

> Hi
> Did the RSpec TMBundle ever have multiple ways of recognising RSpec files?  I'm convinced it user to look for "spec_helper" on the first line.

I'm pretty sure it never did that.

> The Ruby bundle does something similar, as it looks for "firstLineMatch = '^#!/.*\bruby';"
> The reason I ask is because I now have several files that end "_contract.rb".  Conceivably I might have other shared example files with different suffices.  But it's fairly safe to say they will all start with "require 'spec_helper'".

I can't think of a case in which I've required spec_helper from a file that defines shared groups. So in my case, that is not safe to say :)


I think it's good to do things that help end users, but we'd need a more reliable convention to base this on. Anybody (including Ashley) got any other suggestions?


> Cheers
> Ash
> -- 
> http://www.patchspace.co.uk/
> http://www.linkedin.com/in/ashleymoran
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list