diff options
Diffstat (limited to 'spec/ruby/core/struct/shared/dup.rb')
-rw-r--r-- | spec/ruby/core/struct/shared/dup.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/struct/shared/dup.rb b/spec/ruby/core/struct/shared/dup.rb new file mode 100644 index 0000000000..994f3f443e --- /dev/null +++ b/spec/ruby/core/struct/shared/dup.rb @@ -0,0 +1,9 @@ +describe :struct_dup, shared: true do + it "duplicates members" do + klass = Struct.new(:foo, :bar) + instance = klass.new(14, 2) + duped = instance.send(@method) + duped.foo.should == 14 + duped.bar.should == 2 + end +end |