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

Version Path
facets-2.8.4 test/core/binding/test_opvars.rb
facets-2.8.3 test/core/binding/test_opvars.rb
facets-2.8.2 test/core/binding/test_opvars.rb
facets-2.8.1 test/core/binding/test_opvars.rb
facets-2.8.0 test/core/binding/test_opvars.rb
facets-2.7.0 test/core/binding/test_opvars.rb
facets-2.6.0 test/core/binding/test_opvars.rb
facets-2.4.0 test/binding/test_opvars.rb
facets-2.4.1 test/binding/test_opvars.rb
facets-2.4.4 test/core/binding/test_opvars.rb
facets-2.4.3 test/core/binding/test_opvars.rb
facets-2.4.2 test/core/binding/test_opvars.rb
facets-2.5.1 test/core/binding/test_opvars.rb
facets-2.5.0 test/core/binding/test_opvars.rb
facets-2.4.5 test/core/binding/test_opvars.rb
facets-2.5.2 test/core/binding/test_opvars.rb