aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-10-15 03:11:08 +0000
committerJamis Buck <jamis@37signals.com>2006-10-15 03:11:08 +0000
commit39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60 (patch)
tree82c3f3486f3d472447a3540df96de6926e6568e6 /actionpack/test/controller
parent2049313e3c3f0fd907cef469fc8b0d708768ae7a (diff)
downloadrails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.tar.gz
rails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.tar.bz2
rails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.zip
remove an obsolete #dup call. avoid double negatives, to make the code easier to understand and explain
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/routing_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index dc94e9920d..689a07fcbc 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -645,7 +645,7 @@ class DynamicSegmentTest < Test::Unit::TestCase
end
def test_expiry_should_not_trigger_once_expired
- not_expired = false
+ expired = true
hash = merged = {:a => 2, :b => 3}
options = {:b => 3}
expire_on = Hash.new { raise 'No!!!' }
@@ -656,18 +656,18 @@ class DynamicSegmentTest < Test::Unit::TestCase
end
def test_expiry_should_occur_according_to_expire_on
- not_expired = true
+ expired = false
hash = merged = {:a => 2, :b => 3}
options = {:b => 3}
expire_on = {:b => true, :a => false}
eval(segment.expiry_statement)
- assert not_expired
+ assert !expired
assert_equal({:a => 2, :b => 3}, hash)
expire_on = {:b => true, :a => true}
eval(segment.expiry_statement)
- assert ! not_expired
+ assert expired
assert_equal({:b => 3}, hash)
end
@@ -694,7 +694,8 @@ class DynamicSegmentTest < Test::Unit::TestCase
hash = merged = {:a => 'Hi', :b => '3'}
options = {:b => '3'}
a_value = nil
-
+ expired = true
+
eval(segment.extraction_code)
assert_equal 'Hi', a_value
end
@@ -704,13 +705,14 @@ class DynamicSegmentTest < Test::Unit::TestCase
hash = merged = {:b => '3'}
options = {:b => '3'}
a_value = nil
+ expired = true
eval(segment.extraction_code)
assert_equal 'hi', a_value
end
def test_extraction_code_should_perform_expiry
- not_expired = true
+ expired = false
hash = merged = {:a => 'Hi', :b => '3'}
options = {:b => '3'}
expire_on = {:a => true}
@@ -718,7 +720,7 @@ class DynamicSegmentTest < Test::Unit::TestCase
eval(segment.extraction_code)
assert_equal 'Hi', a_value
- assert ! not_expired
+ assert expired
assert_equal options, hash
end