aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-08-01 14:39:18 +0100
committerRobin Houston <robin.houston@gmail.com>2012-08-01 14:39:18 +0100
commit67a3a43cc26f8ad7218f33a13af04c3c74347866 (patch)
tree3fc5f27905332ba4647915eb5823d3d37615fe4c /spec/spec_helper.rb
parentc1d2580892033d28ff05f3d47cee78aaef963c29 (diff)
parentcc3268df4c9de319ea16aa99238e3c4c40dae7c5 (diff)
Merge branch 'develop' into wdtk
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a7f3020c1..c11c7c5bc 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -206,3 +206,16 @@ def load_test_categories
"Miscellaneous",
[ "other", "Miscellaneous", "miscellaneous" ],])
end
+
+
+# Monkeypatch applicationcontroller because the `render_to_string`
+# method in the original breaks all the rspec test assertions such as
+# `should render_template('foo')`. Same problem as
+# http://stackoverflow.com/questions/8174415/is-it-possible-to-assert-template-or-render-template-against-the-same-partial-wi
+# - a bug in either Rails or Rspec I don't have the time to fix :(
+
+class ApplicationController < ActionController::Base
+ def set_popup_banner
+ @popup_banner = nil
+ end
+end