aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/optional/capi/struct_spec.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 14:25:00 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 14:25:00 +0000
commit8180b5bfc0fe4d4b91b590de9110687294552a8f (patch)
treefb6b2270b710d2a8390a1cb0d0bb76b9cbc1c6ad /spec/ruby/optional/capi/struct_spec.rb
parenta6413848153e6c37f6b0fea64e3e871460732e34 (diff)
downloadruby-8180b5bfc0fe4d4b91b590de9110687294552a8f.tar.gz
Update to ruby/spec@09fa86c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/optional/capi/struct_spec.rb')
-rw-r--r--spec/ruby/optional/capi/struct_spec.rb10
1 files changed, 7 insertions, 3 deletions
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