mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9277d27
This commit is contained in:
parent
ce986b41ca
commit
201d501640
17 changed files with 209 additions and 6 deletions
|
|
@ -820,6 +820,15 @@ describe "CApiObject" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "rb_ivar_count" do
|
||||
it "returns the number of instance variables" do
|
||||
obj = Object.new
|
||||
@o.rb_ivar_count(obj).should == 0
|
||||
obj.instance_variable_set(:@foo, 42)
|
||||
@o.rb_ivar_count(obj).should == 1
|
||||
end
|
||||
end
|
||||
|
||||
describe "rb_ivar_get" do
|
||||
it "returns the instance variable on an object" do
|
||||
@o.rb_ivar_get(@test, :@foo).should == @test.instance_eval { @foo }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue