Skip to content

Commit

Permalink
test: Add column_names spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Jul 8, 2024
1 parent 0306858 commit 034e9d2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/active_hash/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ class Country < ActiveHash::Base
end
end

describe ".column_names" do
before do
Country.fields :name, :iso_name, "size"
end

it "returns an array of column names" do
expect(Country.column_names).to eq(["name", "iso_name", "size"])
end
end

describe ".data=" do
before do
class Region < ActiveHash::Base
Expand Down

0 comments on commit 034e9d2

Please sign in to comment.