Sha256: 242449b1001d5d65142760d16df444317e8cf4215bb290af99834717514b6a49
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/kernel/with_accessor.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/kernel/with_accessor.rb' require 'test/unit' class TCKernel < Test::Unit::TestCase # fixture for #with_reader, #with_writer and #with_accessor class TestWith def initialize with_reader :foo => "FOO" with_writer :bar => "BAR" with_accessor :baz => "BAZ" end def get_bar @bar end end def test_with_reader assert_nothing_raised { @t = TestWith.new } assert_equal("FOO", @t.foo) end def test_with_writer assert_nothing_raised { @t = TestWith.new } assert_equal("BAR", @t.get_bar) @t.bar = "BAR2" assert_equal("BAR2", @t.get_bar) end def test_with_accessor assert_nothing_raised { @t = TestWith.new } assert_equal("BAZ", @t.baz) @t.baz = "BAZ2" assert_equal("BAZ2", @t.baz) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/kernel/test_with_accessor.rb |