spec/granite/form/model/dirty_spec.rb in granite-form-0.2.0 vs spec/granite/form/model/dirty_spec.rb in granite-form-0.3.0

- old
+ new

@@ -28,10 +28,10 @@ let(:author) { Author.create!(name: 'Name') } let(:other_author) { Author.create!(name: 'Other') } specify { expect(Model.new.changes).to eq({}) } - specify { expect(Model.new.tap { |m| m.create_something(value: 'Value') }.changes).to eq({}) } + specify { expect(Model.new.tap { |m| m.build_something(value: 'Value') }.changes).to eq({}) } specify { expect(Model.new(author: author).changes).to eq('author_id' => [nil, author.id]) } specify { expect(Model.new(author_id: author.id).changes).to eq('author_id' => [nil, author.id]) } specify { expect(Model.new(authors: [author]).changes).to eq('author_ids' => [[], [author.id]]) } specify { expect(Model.new(author_ids: [author.id]).changes).to eq('author_ids' => [[], [author.id]]) }