Sha256: a314c03b2a15479ab8768cb877f7ecf0a83b02fefdc2e42c67843fb48108bba8
Contents?: true
Size: 573 Bytes
Versions: 54
Compression:
Stored size: 573 Bytes
Contents
require 'test_helper' $outside = __callee__ def fred "I'm in #{__callee__.inspect}" end class KernelTest < Test::Unit::TestCase context "Kernel" do context ".loop" do should "catch StopIteration" do i = 0 r = [] loop do r << i i += 1 raise StopIteration if i > 2 end assert_equal [0, 1, 2], r end end context ".__callee__" do should "conform to doc" do assert_equal "I'm in :fred", fred assert_equal nil, $outside end end end end
Version data entries
54 entries across 54 versions & 2 rubygems