Sha256: 324a01417fcd121f22c6d86662ee6868943a028a3b7b1955c6be47329133255c
Contents?: true
Size: 405 Bytes
Versions: 71
Compression:
Stored size: 405 Bytes
Contents
describe "Kernel#instance_variable_get" do before(:each) do @obj = Object.new @obj.instance_variable_set("@test", :test) end it "returns nil when the referred instance variable does not exist" do @obj.instance_variable_get(:@does_not_exist).should be_nil end it "returns the value of the passed instance variable" do @obj.instance_variable_get(:@test).should == :test end end
Version data entries
71 entries across 71 versions & 3 rubygems