1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Merge pull request #940 from thoughtbot/jw-uniqueness-doc-fix

Use methods that actually persist objects for uniqueness examples
This commit is contained in:
Gui Albuk 2017-10-18 20:33:24 -02:00 committed by GitHub
commit 195bc13019

View file

@ -80,7 +80,7 @@ module Shoulda
#
# RSpec.describe Post, type: :model do
# describe "validations" do
# subject { Post.new(content: "Here is the content") }
# subject { Post.create(content: "Here is the content") }
# it { should validate_uniqueness_of(:title) }
# end
# end
@ -92,7 +92,7 @@ module Shoulda
#
# RSpec.describe Post, type: :model do
# describe "validations" do
# subject { FactoryGirl.build(:post) }
# subject { FactoryGirl.create(:post) }
# it { should validate_uniqueness_of(:title) }
# end
# end