Skip to content

Instantly share code, notes, and snippets.

@markburns
Created February 20, 2012 13:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markburns/1869263 to your computer and use it in GitHub Desktop.
Save markburns/1869263 to your computer and use it in GitHub Desktop.
Failure/Error: Unable to find matching line from backtrace
NoMethodError:
undefined method `original_path_set' for nil:NilClass
# /Users/macmacmacmacmacmac/.rvm/gems/ruby-1.9.3-p0/gems/rspec-rails-2.8.1/lib/rspec/rails/view_rendering.rb:113:in `block (2 levels) in <module:ViewRendering>'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:435:in `instance_eval'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:435:in `instance_eval_with_rescue'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:45:in `run_in'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:80:in `block in run_all'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:80:in `each'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:80:in `run_all'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:368:in `run_hook'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:297:in `block in run_after_each_hooks'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:297:in `each'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:297:in `run_after_each_hooks'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:221:in `run_after_each'
# /Users/mark/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:86:in `block in run'
class FakeTestController < ApplicationController
include YourModuleName
def update
your_module_method_under_test
end
end
#rather than
describe YourModule do
describe "#your_module_method_under_test"
#...
end
#do this instead:
describe FakeTestController
describe "#your_module_method_under_test"
#...
end
@Priyanka-K
Copy link

You are awesome ! thanks for the quick solution.

@gouravtiwari
Copy link

Lovely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment