Skip to content

Commit

Permalink
test: Add skip test if RUBY_VERSION < "3.0.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Jul 19, 2024
1 parent 034e9d2 commit 9679a89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/active_hash/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class Country < ActiveHash::Base
end

it "returns an array of column names" do
skip "Not supported in Ruby 3.0.0" if RUBY_VERSION < "3.0.0"
expect(Country.column_names).to eq(["name", "iso_name", "size"])
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/active_yaml/aliases_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class KeyProduct < ActiveYaml::Base
end

it 'excludes them from column_names' do
skip "Not supported in Ruby 3.0.0" if RUBY_VERSION < "3.0.0"
model.all
expect(model.column_names).to match_array ["name", "flavor", "price"]
end
Expand Down Expand Up @@ -77,6 +78,7 @@ class KeyProduct < ActiveYaml::Base
end

it 'excludes them from column_names' do
skip "Not supported in Ruby 3.0.0" if RUBY_VERSION < "3.0.0"
model.all
expect(model.column_names).to match_array ["name", "flavor", "price", "slogan", "key"]
end
Expand Down

0 comments on commit 9679a89

Please sign in to comment.