1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

Remove unhelpful lint specs

These specs have no expectations, and they are passing
`validate_traits` as an option, which is not an option the linter
understands.

Since the first spec is already covered by "allows for selective
linting" above, and what I assume the second spec was meaning to cover
is covered by the trait specs, I see no reason to keep these around.
This commit is contained in:
Daniel Colson 2018-11-19 00:00:21 -05:00
parent 65689949e4
commit 6e511597c8
No known key found for this signature in database
GPG key ID: 88A364BBE77B1353

View file

@ -61,34 +61,6 @@ describe "FactoryBot.lint" do
end.not_to raise_error
end
it "allows for explicit factories and additional options" do
define_model "User", name: :string do
validates :name, presence: true
end
FactoryBot.define do
factory :user do
name { "assigned" }
end
end
FactoryBot.lint FactoryBot.factories, validate_traits: true
end
it "allows for additional options without explicit factories" do
define_model "User", name: :string do
validates :name, presence: true
end
FactoryBot.define do
factory :user do
name { "assigned" }
end
end
FactoryBot.lint validate_traits: true
end
describe "trait validation" do
context "enabled" do
it "raises if a trait produces an invalid object" do