[rspec-devel] Running specs with TextMate bundle

aslak hellesoy aslak.hellesoy at gmail.com
Sat Nov 4 04:17:33 EST 2006


On 11/4/06, Luke Redpath <luke at agileevolved.com> wrote:
> No the problem does not lie with RSpec. Its definitely down to
> TextMate. Re-adding the TM_SUPPORT_PATH fixed it for me - the support
> path contains a script which runs before any shell commands are
> invoked to make sure the PATH is inherited - this isn't happening so
> files aren't being found.
>
> Try making sure you've got the latest version of TextMate and that
> you've entered the TM_SUPPORT_PATH properly.
>

I have the latest TM release - r1324
I also have the latest RSpec bundle - r316

Here is what I did:

TextMate->Preferences->Advanced
(I only had one variable here - TM_ORGANIZATION_NAME)

Then I added TM_SUPPORT_PATH=/Applications/TextMate.app/Contents/SharedSupport/Support/

When I run a spec with CMD-SHIFT-R I get:
sh: line 1: spec: command not found /tmp/temp_textmate.Y1n1hT:10:in
`passed?': undefined method `match' for nil:NilClass (NoMethodError)
from /tmp/temp_textmate.Y1n1hT:43

I see that the three commands have a fair amount of duplication, and
that they don't have any specs ;-)

Would it be possible to extract the ruby code into a separate file,
get rid of the duplication and have some specs for it? (The specs
could set the TM env vars and run the code). This would hopefully
flesh out better error messages from the bundle itself (in the case
where certain env vars are missing).

One other thing: How does one develop a TM bundle and keep the code in
svn? TM seems to want to remove double-clicked .tmbundle directories.
Is there a trick I don't know here?

Cheers,
Aslak

> Cheers
> Luke
>
> On 3 Nov 2006, at 19:09, Brandon Keepers wrote:
>
> > I'm actually still running the 0.6.4 release (I'm lazy).  Does the TM
> > bundle only work with the latest from SVN?
> >
> > Brandon
> >
> > On Nov 3, 2006, at 1:10 PM, David Chelimsky wrote:
> >
> >> Are you up to date with svn (rspec)?
> >>
> >> There were some problems with a couple of revisions around 102O.
> >>
> >> David
> >>
> >> On 11/3/06, Brandon Keepers <bkeepers at gmail.com> wrote:
> >>> Luke,
> >>>
> >>> That didn't seem to do the trick.  TM_SUPPORT_PATH was missing, so I
> >>> set it to /Applications/TextMate.app/Contents/SharedSupport/Support/
> >>> lib and I still get the error.  Any other suggestions?
> >>>
> >>> Thanks,
> >>> Brandon
> >>>
> >>> On Nov 3, 2006, at 9:20 AM, Luke Redpath wrote:
> >>>
> >>>> Hi Brandon
> >>>>
> >>>> I was having this problem - it seems to be related to the recent
> >>>> updates to TextMate - you'll probably find that your
> >>>> TM_SUPPORT_PATH variable (Preferences > Advanced) has disappeared.
> >>>> You need to re-add this. See here:
> >>>>
> >>>> http://macromates.com/textmate/manual/shell_commands#search_path
> >>>>
> >>>> Cheers
> >>>> Luke
> >>>>
> >>>> On 3 Nov 2006, at 13:06, Brandon Keepers wrote:
> >>>>
> >>>>> Luke,
> >>>>>
> >>>>> Since the last few updates, I haven't been able to run the
> >>>>> specs in
> >>>>> textmate.  It worked the day that you announced it to the list,
> >>>>> but
> >>>>> then I updated the next day an it hasn't worked since.  I just
> >>>>> updated a few minutes ago and I am still getting the same error:
> >>>>>
> >>>>> /tmp/temp_textmate.USgxnG:34: command not found: spec
> >>>>> invitation_spec.rb /tmp/temp_textmate.USgxnG:7:in `passed?':
> >>>>> undefined method `match' for nil:NilClass (NoMethodError) from /
> >>>>> tmp/
> >>>>> temp_textmate.USgxnG:23
> >>>>>
> >>>>> Any ideas?
> >>>>>
> >>>>> Thanks,
> >>>>> Brandon
> >>>>> _______________________________________________
> >>>>> rspec-devel mailing list
> >>>>> rspec-devel at rubyforge.org
> >>>>> http://rubyforge.org/mailman/listinfo/rspec-devel
> >>>>
> >>>> _______________________________________________
> >>>> rspec-devel mailing list
> >>>> rspec-devel at rubyforge.org
> >>>> http://rubyforge.org/mailman/listinfo/rspec-devel
> >>>
> >>> _______________________________________________
> >>> rspec-devel mailing list
> >>> rspec-devel at rubyforge.org
> >>> http://rubyforge.org/mailman/listinfo/rspec-devel
> >>>
> >> _______________________________________________
> >> rspec-devel mailing list
> >> rspec-devel at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-devel
> >
> > _______________________________________________
> > rspec-devel mailing list
> > rspec-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-devel
>
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list