Skip to content

Commit

Permalink
Merge pull request #6 from parndt/patch-1
Browse files Browse the repository at this point in the history
Fixed deprecation in Rails 3.2 where InstanceMethods is no longer included in Rails 4.0
  • Loading branch information
stevehodgkiss committed Jan 28, 2012
2 parents 889dcfc + 9a0cd83 commit bff19ce
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/generator_spec/test_case.rb
Expand Up @@ -34,17 +34,15 @@ def destination(path)
end end
end end


module InstanceMethods def method_missing(method_sym, *arguments, &block)
def method_missing(method_sym, *arguments, &block) self.test_case_instance.send(method_sym, *arguments, &block)
self.test_case_instance.send(method_sym, *arguments, &block) end
end

def respond_to?(method_sym, include_private = false)
def respond_to?(method_sym, include_private = false) if self.test_case_instance.respond_to?(method_sym)
if self.test_case_instance.respond_to?(method_sym) true
true else
else super
super
end
end end
end end
end end
Expand Down

0 comments on commit bff19ce

Please sign in to comment.