Last active
August 29, 2015 14:27
-
-
Save matthewd/314493760560a5fdc7f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/helpers/application_helper/toolbar_builder_spec.rb b/spec/helpers/application_helper/toolbar_builder_spec.rb | |
index 546ce2b..81ce5f3 100644 | |
--- a/spec/helpers/application_helper/toolbar_builder_spec.rb | |
+++ b/spec/helpers/application_helper/toolbar_builder_spec.rb | |
@@ -3,11 +3,14 @@ | |
describe ApplicationHelper do | |
before do | |
controller.send(:extend, ApplicationHelper) | |
- self.class.send(:include, ApplicationHelper) | |
end | |
def method_missing(sym, *args) | |
- b = _toolbar_builder | |
+ instance_variables.each do |ivar| | |
+ controller.instance_variable_set ivar, instance_variable_get(ivar) | |
+ end | |
+ | |
+ b = controller._toolbar_builder | |
if b.respond_to?(sym, true) | |
b.send(sym, *args) | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment