test/memoist_test.rb in memoist-0.9.1 vs test/memoist_test.rb in memoist-0.9.2
- old
+ new
@@ -287,18 +287,18 @@
assert_equal 2.5625, company.sales_tax(25)
assert_equal 2, company.sales_tax_calls
end
def test_double_memoization
- assert_raise(RuntimeError) { Person.memoize :name }
+ assert_raise(Memoist::AlreadyMemoizedError) { Person.memoize :name }
person = Person.new
person.extend Memoist
- assert_raise(RuntimeError) { person.memoize :name }
+ assert_raise(Memoist::AlreadyMemoizedError) { person.memoize :name }
company = Company.new
company.extend Memoist
company.memoize :name
- assert_raise(RuntimeError) { company.memoize :name }
+ assert_raise(Memoist::AlreadyMemoizedError) { company.memoize :name }
end
def test_double_memoization_with_identifier
assert_nothing_raised { Person.memoize :name, :identifier => :again }
end
\ No newline at end of file