mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
5f1a1de114
This commit applies the changes from running `standardrb --fix`
17 lines
362 B
Ruby
17 lines
362 B
Ruby
describe "finding factories keyed by class instead of symbol" do
|
|
before do
|
|
define_model("User") do
|
|
attr_accessor :name, :email
|
|
end
|
|
|
|
FactoryBot.define do
|
|
factory :user
|
|
end
|
|
end
|
|
|
|
it "doesn't find the factory" do
|
|
expect { FactoryBot.create(User) }.to(
|
|
raise_error(KeyError, /Factory not registered: User/)
|
|
)
|
|
end
|
|
end
|