[rspec-users] Recognising RSpec files in the Textmate bundle
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>
>> 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.
More information about the rspec-users