Sha256: 30c0039a44451afcd4f1dcaa7705d59f9103d4cdfefc856daba6bb2ae422732f

Contents?: true

Size: 408 Bytes

Versions: 9

Compression:

Stored size: 408 Bytes

Contents

require 'helper'
require 'ostruct'

class TestOpenStruct < Test::Unit::TestCase
  
  context "A normal OpenStruct object" do
    
    setup do
      @os = OpenStruct.new :bill => :gates, :steve => :jobs
    end
  
    should "be clearable" do
      assert_equal :gates, @os.bill
      assert_equal :jobs, @os.steve
      @os.clear
      assert_nil @os.bill
      assert_nil @os.steve
    end
    
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
csd-0.1.17 test/unit/test_open_struct.rb
csd-0.1.16 test/unit/test_open_struct.rb
csd-0.1.15 test/unit/test_open_struct.rb
csd-0.1.14 test/unit/test_open_struct.rb
csd-0.1.13 test/unit/test_open_struct.rb
csd-0.1.12 test/unit/test_open_struct.rb
csd-0.1.11 test/unit/test_open_struct.rb
csd-0.1.10 test/unit/test_open_struct.rb
csd-0.1.9 test/unit/test_open_struct.rb