Permalink
Browse files

Fix deprecation warnings in verification tests.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4963 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c3a5252 commit 25ea18aa150c7eb26fd09ab6ab26eb455fac7ff0 @jeremy jeremy committed Sep 4, 2006
Showing with 6 additions and 6 deletions.
  1. +6 −6 actionpack/test/controller/verification_test.rb
View
12 actionpack/test/controller/verification_test.rb
@@ -9,7 +9,7 @@ class TestController < ActionController::Base
:redirect_to => { :action => "unguarded" }
verify :only => :guarded_with_flash, :params => "one",
- :add_flash => { "notice" => "prereqs failed" },
+ :add_flash => { :notice => "prereqs failed" },
:redirect_to => { :action => "unguarded" }
verify :only => :guarded_in_session, :session => "one",
@@ -46,15 +46,15 @@ def guarded_two
end
def guarded_in_session
- render :text => "#{@session["one"]}"
+ render :text => "#{session["one"]}"
end
def multi_one
- render :text => "#{@session["one"]}:#{@session["two"]}"
+ render :text => "#{session["one"]}:#{session["two"]}"
end
def multi_two
- render :text => "#{@session["two"]}:#{@session["one"]}"
+ render :text => "#{session["two"]}:#{session["one"]}"
end
def guarded_by_method
@@ -108,13 +108,13 @@ def test_guarded_one_without_prereqs
def test_guarded_with_flash_with_prereqs
get :guarded_with_flash, :one => "here"
assert_equal "here", @response.body
- assert_flash_empty
+ assert flash.empty?
end
def test_guarded_with_flash_without_prereqs
get :guarded_with_flash
assert_redirected_to :action => "unguarded"
- assert_flash_equal "prereqs failed", "notice"
+ assert_equal "prereqs failed", flash[:notice]
end
def test_guarded_two_with_prereqs

0 comments on commit 25ea18a

Please sign in to comment.