Skip to content

Commit

Permalink
added quotes around factory classes (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorjuice authored and composerinteralia committed Dec 18, 2019
1 parent 6ccbb87 commit 6fddc45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GETTING_STARTED.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6fddc45

Please sign in to comment.