[rspec-users] Recognising RSpec files in the Textmate bundle
rick.denatale at gmail.com
Tue Aug 10 10:03:40 EDT 2010
On Tue, Aug 10, 2010 at 9:40 AM, Ashley Moran
<ashley.moran at patchspace.co.uk> wrote:
> On 9 Aug 2010, at 17:37, Rick DeNatale wrote:
>> 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.
> Hi Rick,
> I think that was what David was saying? (If I understood you both correctly, that is.)
> It's not enough to treat RSpec files as Ruby because they have too many specific highlighting rules and completions etc, which we don't want mixed into plain Ruby source.
Yeah, I see that the RSpec bundle actually does have a Language
definition, somehow I missed that when I looked before.
> My specific example is I now have three files "*_contract.rb" that I'd like highlighted. But if everyone chipped in with their own convention we'd probably end in chaos.
> I like the "_sgroup.rb" idea though. Or maybe "_examples.rb"? That's fairly generic.
And easy to add yourself by just editing the bundle.
> Or... how about an actual dot-suffix, ".rspec", eg, "active_record_associations.rspec", which would be designed to indicate an RSpec-loadable file (prob shared example groups), but one that doesn't make sense to run alone (or can't be)? Any legs in that idea?
I don't think I like that. For one thing most folks don't include the
dot suffix in require 'statements'.
More information about the rspec-users