[rspec-devel] [ rspec-Patches-10791 ] A 'switch between source and spec file' command for textmate (with auto-creation!)

noreply at rubyforge.org noreply at rubyforge.org
Sun Jun 24 18:14:41 EDT 2007


Patches item #10791, was opened at 2007-05-12 01:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=10791&group_id=797

Category: None
>Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Ruy Asan (rubyruy)
>Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary:  A 'switch between source and spec file' command for textmate (with auto-creation!)

Initial Comment:
There is a great deal of switching back and forth between source and spec files when doing RSpec. The official tmbundle could probably benefit from this.

Unforunately, I started writing this for just-my-own-use, so as a result it's not very pretty, needs to be tested, integrated with the various (and annoyingly un-documented) textmate libs and packaged.

If a fellow text-mater wants to clean it up and add it to the official bundle, please do :) If not, I'll probably make it into a proper patch when I get some time.

Source (and added info) here:

http://ruy.ca/posts/6-A-simple-switch-between-source-and-spec-file-command-for-textmate-with-auto-creation-

----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-06-24 18:14

Message:
I have added the command (r2127). It's based on this, but completely rewritten (with specs).

----------------------------------------------------------------------

Comment By: Scott Taylor (smtlaissezfaire)
Date: 2007-05-13 20:58

Message:
On Point #1, you may need to use the textmate url syntax:

tmate://path/to/file

that's what the rails tmbundle uses to open files inside the already open project.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-05-13 19:04

Message:
Very nice, but I have two problems:

1) When I run the command, TextMate complains: command not found: mate /path/to/some/file
2) There are no specs for this. It won't get in without specs.

I recommend adding to the existing specs for RSpec.tmbundle. You can also add some fixtures (Some app/spec file pairs). The specs should be decoupled from TextMate itself.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=10791&group_id=797


More information about the rspec-devel mailing list