Sha256: 74947790524379586d4f57096864394f760d0fda428f65247c401282ce442f22
Contents?: true
Size: 909 Bytes
Versions: 10
Compression:
Stored size: 909 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/binding/vars.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/binding/vars.rb' require 'test/unit' class TestBindingVariables < Test::Unit::TestCase def setup a = 1 b = 2 x = "hello" # the line number must be updated if it moves @bind = binding; @this_line_no = __LINE__ @this_file_name = File.basename( __FILE__ ) # why does it equal basename only? end def test_local_variables assert_equal( ["a","b","x"], @bind.local_variables ) end def test_op_store assert_nothing_raised{ @bind["x"] = "goodbye" } assert_equal( "goodbye", @bind["x"] ) end def test_op_fetch assert_equal( "hello", @bind["x"] ) end end
Version data entries
10 entries across 10 versions & 1 rubygems