Skip to content

Commit

Permalink
Add specs for Struct#deconstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin authored and eregon committed Jan 17, 2020
1 parent 19a5268 commit a8dc71f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/struct/deconstruct_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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

0 comments on commit a8dc71f

Please sign in to comment.