[rspec-users] Recognising RSpec files in the Textmate bundle
rick.denatale at gmail.com
Mon Aug 9 12:37:15 EDT 2010
On Mon, Aug 9, 2010 at 11:23 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> 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>
>>>> 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.
> 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.
Well, I'd still use a different file name suffix which I could set
textmate to recognize as a spec
_sspec.rb or _sgroup.rb
something like that.
If TM 2 ever sees the light of day, maybe there will be alternatives, but ...
More information about the rspec-users