Skip to content

Commit

Permalink
un-DRY the multiple complex arguments test
Browse files Browse the repository at this point in the history
catches a cache bug in 1.8.6 related to unique object compares
  • Loading branch information
kyledrake authored and rtomayko committed Sep 10, 2010
1 parent e77f867 commit 638e1db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/tilt_cache_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ class TiltCacheTest < Test::Unit::TestCase

test "caching with multiple complex arguments to #fetch" do
template = nil
args = ['hello', {:foo => 'bar', :baz => 'bizzle'}]
result = @cache.fetch(*args) { template = Tilt::StringTemplate.new {''} }
result = @cache.fetch('hello', {:foo => 'bar', :baz => 'bizzle'}) { template = Tilt::StringTemplate.new {''} }
assert_same template, result
result = @cache.fetch(*args) { fail 'should be cached' }
result = @cache.fetch('hello', {:foo => 'bar', :baz => 'bizzle'}) { fail 'should be cached' }
assert_same template, result
end

Expand Down

0 comments on commit 638e1db

Please sign in to comment.