1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/struct/deconstruct_spec.rb
2020-01-28 20:47:48 +01:00

12 lines
264 B
Ruby

require_relative '../../spec_helper'
ruby_version_is "2.7" do
describe "Struct#deconstruct" do
it "returns an array of attribute values" do
struct = Struct.new(:x, :y)
s = struct.new(1, 2)
s.deconstruct.should == [1, 2]
end
end
end