From 8180b5bfc0fe4d4b91b590de9110687294552a8f Mon Sep 17 00:00:00 2001 From: eregon Date: Mon, 27 Aug 2018 14:25:00 +0000 Subject: Update to ruby/spec@09fa86c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/optional/capi/struct_spec.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'spec/ruby/optional/capi/struct_spec.rb') diff --git a/spec/ruby/optional/capi/struct_spec.rb b/spec/ruby/optional/capi/struct_spec.rb index 06fb189b58..b3acd02b61 100644 --- a/spec/ruby/optional/capi/struct_spec.rb +++ b/spec/ruby/optional/capi/struct_spec.rb @@ -64,7 +64,7 @@ end describe "C-API Struct function" do before :each do @s = CApiStructSpecs.new - @struct = @s.rb_struct_define_under(CApiStructSpecs, "CAPIStruct", "a", "b", "c") + @struct = @s.rb_struct_define_under(CApiStructSpecs, "CAPIStructUnder", "a", "b", "c") end describe "rb_struct_define_under" do @@ -80,11 +80,15 @@ describe "C-API Struct function" do it "has a value of nil for the member of a newly created instance" do # Verify that attributes are on an instance basis - CApiStructSpecs::CAPIStruct.new.b.should be_nil + CApiStructSpecs::CAPIStructUnder.new.b.should be_nil + end + + it "does not create a constant scoped under Struct for the named Struct" do + Struct.should_not have_constant(:CAPIStructUnder) end it "creates a constant scoped under the namespace of the given class" do - CApiStructSpecs.should have_constant(:CAPIStruct) + CApiStructSpecs.should have_constant(:CAPIStructUnder) end it "returns the member names as Symbols" do -- cgit v1.2.3