Permalink
Browse files

Instead of removing the instance variable just set it to nil, resolve…

…s the warnings because of a missing instance variable
  • Loading branch information...
1 parent 270fa63 commit 1c94ba03328775a79541e3240ff2469d237b9f3b @bcardarella bcardarella committed Jul 29, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/template/sprockets_helper_test.rb
@@ -97,7 +97,7 @@ def url_for(*args)
end
test "stylesheets served without a controller in scope cannot access the request" do
- remove_instance_variable("@controller")
+ @controller = nil
@config.action_controller.asset_host = Proc.new do |asset, request|
fail "This should not have been called."
end
@@ -107,7 +107,7 @@ def url_for(*args)
end
test "stylesheets served without a controller in do not use asset hosts when the default protocol is :request" do
- remove_instance_variable("@controller")
+ @controller = nil
@config.action_controller.asset_host = "assets-%d.example.com"
@config.action_controller.default_asset_host_protocol = :request
@config.action_controller.perform_caching = true

2 comments on commit 1c94ba0

Contributor

avakhov replied Aug 1, 2011

I'm sorry I found a lot off commits in rails about resolving warnings.
But which tool does these warnings generate?

Owner

tenderlove replied Aug 1, 2011

ruby will generate these warnings if you run with -w.

Please sign in to comment.