Rspec failures - undefined method `__rspec_original_dup' for class

30 views
Skip to first unread message

Mark Taylor

unread,
May 20, 2013, 2:35:42 PM5/20/13
to rapi...@googlegroups.com
I've just pulled the latest code. When I run the rspec tests I get 10 failures that all look like this:

1) AdvancedSearchController export data should handle full PDF
   Failure/Error: Unable to find matching line from backtrace
   NameError:
     undefined method `__rspec_original_dup' for class `Addons::PdfExportTask'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/any_instance.rb:73:in `alias_method'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/any_instance.rb:73:in `restore_dup'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/any_instance.rb:72:in `class_eval'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/any_instance.rb:72:in `restore_dup'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/any_instance.rb:46:in `rspec_reset'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/space.rb:17:in `reset_all'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/space.rb:16:in `each'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks/space.rb:16:in `reset_all'
   # /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.11.3/lib/rspec/mocks.rb:23:in `teardown'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/mocking/with_rspec.rb:18:in `teardown_mocks_for_rspec'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:308:in `run_after_each'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:119:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253:in `with_around_each_hooks'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:378:in `run_examples'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `map'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `run_examples'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:360:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `map'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in `report'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
   # /Library/Ruby/Gems/1.8/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `autorun'
   # /usr/bin/rspec:19

After a bit of investigation, I found this issue on rspec's github repo: https://github.com/rspec/rspec-mocks/issues/168

The net result of which seems to be that there is an issue with rspec 2.11 that may/will be fixed at some point.

Has anybody else encountered this issue, or is there something going on with my mac setup? I am using rbenv to run ruby:
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]

Thanks

Mark

Mark Taylor

unread,
May 20, 2013, 3:18:47 PM5/20/13
to rapi...@googlegroups.com
Have tried updating to rspec 2.13.1 with no change :-(
Reply all
Reply to author
Forward
0 new messages