We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56fd240 commit 56227a4Copy full SHA for 56227a4
spec/concurrent/struct_shared.rb
@@ -27,13 +27,15 @@
27
end
28
29
it'ignores methods on ancestor classes'do
30
-ancestor=described_class.ancestors.first
31
-ancestor.class_eval{deffoo;end}
+ancestor=described_class.ancestors.last
+ancestor.class_eval{deffoo(bar);end}
32
33
clazz=described_class.new(:foo)
34
-expect{described_class.const_get(clazz.to_s)}.toraise_error(NameError)
35
-expect(clazz).tobe_aClass
36
-expect(clazz.ancestors).toincludedescribed_class
+struct=clazz.new
+
+expect(struct).torespond_to:foo
37
+method=struct.method(:foo)
38
+expect(method.arity).toeq0
39
40
ancestor.send:remove_method,:foo
41
0 commit comments