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:
commit
195bc13019
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue