Only run did you mean spec it it's available

This spec has been problematic more than once, and I even removed it at
one point. I think this is a reasonable middle ground.
This commit is contained in:
Daniel Colson 2021-03-30 19:42:53 -04:00
parent 131d7791c5
commit 0f7f488415
No known key found for this signature in database
GPG Key ID: 88A364BBE77B1353
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ describe "looking up traits that don't exist" do
)
end
it "maintains 'Did you mean?' suggestions at the end of the error message" do
it "maintains 'Did you mean?' suggestions at the end of the error message", skip: !defined?(DidYouMean) do
define_class("User")
FactoryBot.define do

View File

@ -28,7 +28,7 @@ describe FactoryBot::Registry do
.to raise_error(KeyError, "Great thing not registered: \"object_name\"")
end
it "includes a did_you_mean message" do
it "includes a did_you_mean message", skip: !defined?(DidYouMean) do
registry = FactoryBot::Registry.new(:registry)
registered_object = double(:registered_object)
registry.register(:factory_bot, registered_object)