Sha256: 35fa185dd0dd12674c922766b4e9bd91f25e7cda75c329676fd9f33e4057be94
Contents?: true
Size: 537 Bytes
Versions: 14
Compression:
Stored size: 537 Bytes
Contents
describe "Object" do before do @source = Object.new @source.instance_variable_set(:@bar, 'bar') @source.instance_variable_set(:@baz, 'baz') end describe "instance_variable_names" do it "should return all instance variable names" do @source.instance_variable_names.sort.should == %w(@bar @baz) end end describe "instance_values" do it "should return the values of all instance variables as a hash" do @source.instance_values.should == {'bar' => 'bar', 'baz' => 'baz'} end end end
Version data entries
14 entries across 14 versions & 2 rubygems