Permalink
Browse files

Fixed deprecation in Rails 3.2 where InstanceMethods is no longer inc…

…luded by default in Rails 4.0.


Message was (from Refinery CMS):
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in #<Class:0x007fb2e8a65610> instead. (called from include at /code/parndt/Refinery/core/spec/lib/generators/refinery/cms/cms_generator_spec.rb:7)
  • Loading branch information...
parndt committed Jan 28, 2012
1 parent 889dcfc commit 9a0cd8322b26d7bc65e663669a0c8376216ebbb0
Showing with 9 additions and 11 deletions.
  1. +9 −11 lib/generator_spec/test_case.rb
@@ -34,17 +34,15 @@ def destination(path)
end
end
- module InstanceMethods
- def method_missing(method_sym, *arguments, &block)
- self.test_case_instance.send(method_sym, *arguments, &block)
- end
-
- def respond_to?(method_sym, include_private = false)
- if self.test_case_instance.respond_to?(method_sym)
- true
- else
- super
- end
+ def method_missing(method_sym, *arguments, &block)
+ self.test_case_instance.send(method_sym, *arguments, &block)
+ end
+
+ def respond_to?(method_sym, include_private = false)
+ if self.test_case_instance.respond_to?(method_sym)
+ true
+ else
+ super
end
end
end

0 comments on commit 9a0cd83

Please sign in to comment.