Sha256: 7864424c845c9e9f57dcd336112a9da4c617ff134669a5f3c3b193b48daa48c5
Contents?: true
Size: 530 Bytes
Versions: 16
Compression:
Stored size: 530 Bytes
Contents
require 'facets/binding/opvars' 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_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
16 entries across 16 versions & 1 rubygems