test/simple/lazy_test.rb in simple-lazy-1.0.1 vs test/simple/lazy_test.rb in simple-lazy-1.0.2
- old
+ new
@@ -43,6 +43,12 @@
lazy = Simple::Lazy.new(1) { nil }
assert_equal(false, lazy.cached?)
assert_equal("", lazy.to_s)
assert_equal(true, lazy.cached?)
end
+
+ def test_6
+ lazy = Simple::Lazy.new(1) { 2 }
+ assert_equal(true, lazy.respond_to?(:to_i))
+ assert_equal(false, lazy.respond_to?(:to_something_else))
+ end
end