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

David Chelimsky dchelimsky at gmail.com
Mon Aug 9 11:23:32 EDT 2010

On Aug 9, 2010, at 9:56 AM, Rick DeNatale wrote:

> 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
> http://blog.macromates.com/2007/file-type-detection-rspec-rails/
> It's worked well for me for quite some time.

Hey Rick,

Shared groups are typically stored in a file that has a different name, and ppl want access to all the code completion and syntax highlighting of spec files in those files.


> -- 
> 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
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list