From 6fddc456738185d1f7728b5e1a53afa1ce16a2f6 Mon Sep 17 00:00:00 2001 From: Jamie <11019755+gatorjuice@users.noreply.github.com> Date: Wed, 18 Dec 2019 17:58:58 -0600 Subject: [PATCH] added quotes around factory classes (#1358) --- GETTING_STARTED.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 23ae2fec2..58abe6901 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -119,7 +119,7 @@ It is also possible to explicitly specify the class: ```ruby # This will use the User class (otherwise Admin would have been guessed) -factory :admin, class: User +factory :admin, class: "User" ``` If the constant is not available @@ -1066,7 +1066,7 @@ Example Rake task: namespace :factory_bot do desc "Verify that all FactoryBot factories are valid" task lint: :environment do - if Rails.env.test? + if Rails.env.test? conn = ActiveRecord::Base.connection conn.transaction do FactoryBot.lint @@ -1413,12 +1413,12 @@ with associations, as below: ```ruby FactoryBot.define do - factory :united_states, class: Location do + factory :united_states, class: "Location" do name { 'United States' } association :location_group, factory: :north_america end - factory :north_america, class: LocationGroup do + factory :north_america, class: "LocationGroup" do name { 'North America' } end end