[rspec-devel] [ rspec-Patches-9282 ] Change to allow running specs from textmate with rspec installed as a rails plugin (and no rspec gem installed)

noreply at rubyforge.org noreply at rubyforge.org
Mon Apr 2 03:31:37 EDT 2007


Patches item #9282, was opened at 14/03/2007 15:51
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=9282&group_id=797

Category: None
Group: None
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Jonathan Tron (jonathant)
Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: Change to allow running specs from textmate with rspec installed as a rails plugin  (and no rspec gem installed)

Initial Comment:
I changed all require call to use a full path based on File.dirname(__FILE__).
I modified the spec_mate.rb of RSpec.tmbundle to look for rspec as a rails plugins (check if ENV['TM_PROJECT_DIRECTORY'] and ENV['TM_PROJECT_DIRECTORY']/vendor/plugins/rspec/lib/rspec.rb are present) and fallback to a simple require 'spec'. 

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

Comment By: Jonathan Tron (jonathant)
Date: 02/04/2007 09:31

Message:
Wohh great... thanks for taking the time to do it. 

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

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 01/04/2007 14:12

Message:
Fixed in branches/0.9-dev#1671 (with a simpler fix - see attached patch)

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

Comment By: Jonathan Tron (jonathant)
Date: 14/03/2007 16:58

Message:
I tried to use "$:.unshift" method first, but I had some
trouble with files not loading correctly (I confess not
having searched to far to identified the problem). So I
choosed to go the way it is done in rspec_on_rails plugin.

If you prefer I think I could have a second look for the
"clean" solution by tomorrow. 

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

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 14/03/2007 16:17

Message:
I like the idea, but your patch modifies a bunch of require statements in RSpec core. Is that really necessary? Wouldn't it be better to use LOAD_PATH and avoid all of these ugly absolute paths everywhere?

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

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


More information about the rspec-devel mailing list