jimweirich / rspec-given

Given/When/Then keywords for RSpec Specifications
https://github.com/jimweirich/rspec-given
MIT License
653 stars 61 forks source link

rspec-given seems to cause RAILS_ENV=test rake db:migrate to fail #12

Closed superchris closed 11 years ago

superchris commented 11 years ago

When running:

RAILS_ENV=test be rake db:migrate

with rspec-given in the Gemfile I get:

uninitialized constant RSpec::Matchers org/jruby/RubyModule.java:2677:in const_missing' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given/have_failed.rb:9:inHaveFailed' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given/have_failed.rb:3:in Given' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given/have_failed.rb:2:inRSpec' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given/have_failed.rb:1:in (root)' org/jruby/RubyKernel.java:1027:inrequire' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given.rb:1:in (root)' org/jruby/RubyKernel.java:1027:inrequire' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec/given.rb:16:in (root)' org/jruby/RubyKernel.java:1027:inrequire' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec-given.rb:1:in (root)' org/jruby/RubyArray.java:1613:ineach' /Users/superchris/dev/ipc/binmgt/vendor/jruby/1.9/gems/rspec-given-2.3.0/lib/rspec-given.rb:9:in (root)' org/jruby/RubyArray.java:1613:ineach' /Users/superchris/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:1:in (root)' /Users/superchris/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:inrequire' /Users/superchris/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in require' org/jruby/RubyKernel.java:1027:inrequire' /Users/superchris/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in require' org/jruby/RubyKernel.java:1046:inload' /Users/superchris/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib/bundler.rb:128:in require' /Users/superchris/dev/ipc/binmgt/config/application.rb:7:in(root)' /Users/superchris/dev/ipc/binmgt/Rakefile:1:in (root)' /Users/superchris/dev/ipc/binmgt/Rakefile:5:in(root)' org/jruby/RubyKernel.java:1046:in `load'

jimweirich commented 11 years ago

I haven't had time to dig into this yet. It looks like you are loading test code for migrations, and that seems strange. That being said, I suspect rspec-given is missing an explicit require where we define our matcher. I'll double check that.

Are you going to be in the office tomorrow. Maybe I'll stop by for "Code and Coffee" and we can look at it together.

superchris commented 11 years ago

Sounds good. If I aim to get there at 9 is that too late for you?

--Chris

On Thu, Jan 24, 2013 at 3:44 PM, Jim Weirich notifications@github.comwrote:

I haven't had time to dig into this yet. It looks like you are loading test code for migrations, and that seems strange. That being said, I suspect rspec-given is missing an explicit require where we define our matcher. I'll double check that.

Are you going to be in the office tomorrow. Maybe I'll stop by for "Code and Coffee" and we can look at it together.

— Reply to this email directly or view it on GitHubhttps://github.com/jimweirich/rspec-given/issues/12#issuecomment-12672323.

jimweirich commented 11 years ago

On Jan 24, 2013, at 4:26 PM, Chris Nelson notifications@github.com wrote:

Sounds good. If I aim to get there at 9 is that too late for you?

Works for me.

-- Jim Weirich -- jim.weirich@gmail.com

jimweirich commented 11 years ago

New gem seems to fix.