jimweirich / rspec-given

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

Possible compatibility issue #9

Closed searls closed 12 years ago

searls commented 12 years ago

Just ran into this error, about to start debugging

Error

$ bundle exec rspec
F

Failures:

  1) FindsWords#find 
     Failure/Error: Unable to find matching line from backtrace
     NoMethodError:
       undefined method `_rg_givens' for BasicObject:Class
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-given-2.0.0/lib/rspec/given/extensions.rb:17:in `block in _rg_establish_givens'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-given-2.0.0/lib/rspec/given/extensions.rb:16:in `each'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-given-2.0.0/lib/rspec/given/extensions.rb:16:in `_rg_establish_givens'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-given-2.0.0/lib/rspec/given/extensions.rb:132:in `block in When'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:237:in `instance_eval'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:237:in `instance_eval'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/hooks.rb:23:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/hooks.rb:72:in `block in run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/hooks.rb:72:in `each'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/hooks.rb:72:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/hooks.rb:424:in `run_hook'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:332:in `run_before_each_hooks'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:300:in `run_before_each'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:113:in `block in run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:254:in `with_around_each_hooks'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:111:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:388:in `block in run_examples'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `map'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `run_examples'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:369:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:370:in `block in run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:370:in `map'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:370:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `map'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block in run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/reporter.rb:34:in `report'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:25:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:69:in `run'
     # /Users/justin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:8:in `block in autorun'

Finished in 0.00038 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/lib/finds_words_spec.rb:14 # FindsWords#find 

My Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    diff-lcs (1.1.3)
    gimme (0.3.4)
    rspec (2.12.0)
      rspec-core (~> 2.12.0)
      rspec-expectations (~> 2.12.0)
      rspec-mocks (~> 2.12.0)
    rspec-core (2.12.0)
    rspec-expectations (2.12.0)
      diff-lcs (~> 1.1.3)
    rspec-given (2.0.0)
      rspec (> 1.2.8)
    rspec-mocks (2.12.0)

PLATFORMS
  ruby

DEPENDENCIES
  gimme
  rspec
  rspec-given

My Ruby

$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
searls commented 12 years ago

And it may not amaze you to learn that bundle update'ing rspec-given from 2.0.0 to 2.2.0 fixed my issue.

jimweirich commented 12 years ago

Yes, I discovered this myself before any users reported it.

Thanks for the precise and detailed bug report. I wish they were all that good.