1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/acceptance/keyed_by_class_spec.rb
Daniel Colson 5f1a1de114 Run standardrb
This commit applies the changes from running `standardrb --fix`
2020-06-10 17:11:39 -04:00

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