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

Rick DeNatale rick.denatale at gmail.com
Mon Aug 9 10:56:07 EDT 2010

On Sun, Aug 8, 2010 at 11:45 PM, Elliot Winkler
<elliot.winkler at gmail.com> wrote:
> On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe <phillipkoebbe at gmail.com>
> wrote:
>> Here's another idea that's not so great, but maybe it will spur some
>> thinking in someone else. What about a custom generator (or a flag on the
>> official one) that added something like a shebang line at the beginning of
>> example files. A short comment that identifies the file, like "# RSpec".
>> Then a TM bundle could pick up on that and be happy.
> Putting aside the fact that this is solving a very specific problem.... what
> about #!/usr/bin/env spec ? 99% of the time the shebang won't be used, I'd
> wager, so it'd pretty much be harmless.

As I tried to point out, textmate looks for shebang lines to compare
against in the language definitions.  Right now the rspec bundle
doesn't have a language definition since rspec files are really ruby
files and want to use that language definition.

I guess I just don't see what's wrong with using the convention of
naming spec files with the suffix _spec.rb as Mr. Textmate suggests

It's worked well for me for quite some time.

Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

More information about the rspec-users mailing list