[rspec-devel] Rails #8115 and spec/matchers/have
Brandon Keepers
brandon at collectiveidea.com
Thu Nov 8 10:20:00 EST 2007
Rails commit #8115 refactored how plugins are loaded and now adds all
the vendor/plugins/*/lib directories to the load path before
initializing all the plugins.
rspec and rspec_on_rails both have spec/matchers/have.rb, and now that
they're both in the load path, when rspec initializes and requires
spec/matchers/have, the rspec_on_rails version gets loaded.
This seems to only happen when I run integration tests and not specs
(stack trace below). The ways I see to fix this are 1) require these
using an absolute path or 2) rename the rails one to spec/rails/
matchers/have, or something along those lines.
I'd be happy to submit a patch, let me know what you think about ways
to get around this.
Brandon
/Users/brandon/projects/dealerflow/vendor/plugins/rspec_on_rails/lib/
spec/matchers/have.rb:4:in `alias_method': undefined method
`failure_message' for class `Spec::Matchers::Have' (NameError)
from /Users/brandon/projects/dealerflow/vendor/plugins/rspec_on_rails/
lib/spec/matchers/have.rb:4
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /Users/brandon/projects/dealerflow/vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from /Users/brandon/projects/dealerflow/vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
from /Users/brandon/projects/dealerflow/vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from /Users/brandon/projects/dealerflow/vendor/plugins/rspec_on_rails/
lib/spec/matchers.rb:3
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
... 28 levels...
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5
Errors running test:integration!
~/projects/dealerflow brandon$
More information about the rspec-devel
mailing list