diff --git a/spec/granite/form/model/associations/reflections/embeds_many_spec.rb b/spec/granite/form/model/associations/reflections/embeds_many_spec.rb index ccef6ad..31eaea1 100644 --- a/spec/granite/form/model/associations/reflections/embeds_many_spec.rb +++ b/spec/granite/form/model/associations/reflections/embeds_many_spec.rb @@ -139,9 +139,9 @@ end specify do - expect(User.new.tap do |u| - u.projects.build(title: 'Project') - end.projects).to match([have_attributes(title: 'Project')]) + user = User.new + user.projects.build(title: 'Project') + expect(user.projects).to match([have_attributes(title: 'Project')]) end end