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:
parent
65689949e4
commit
6e511597c8
1 changed files with 0 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue