-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Because the latest is a good thing to have. Because it's the right thing to do. Because there will probably be some factory shenanigans with a Rails 5.0 to 5.1 upgrade. Also moves factorybot and faker to the development & test group because they are sometimes handy in the development environment for cobbling up test data. Also also alphabetized the test group because rubocop likes that. Also also also, resolve deprecation warning about static attributes in factories. Signed-off-by: Robb Kidd <rkidd@chef.io>
- Loading branch information
Showing
28 changed files
with
95 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :category do | ||
name 'Other' | ||
name { 'Other' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :cookbook_dependency do | ||
association :cookbook_version | ||
association :cookbook | ||
|
||
name 'apt' | ||
version_constraint '>= 0.1.0' | ||
name { 'apt' } | ||
version_constraint { '>= 0.1.0' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :email do | ||
association :user | ||
email { "#{user.username}@example.com" } | ||
confirmation_token 'ABCD1234' | ||
confirmation_token { 'ABCD1234' } | ||
confirmed_at { 1.day.ago } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :group do | ||
sequence(:name) { |n| "My Group #{n}" } | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :group_member do | ||
association :user | ||
association :group | ||
admin nil | ||
admin { nil } | ||
|
||
factory :admin_group_member, class: GroupMember do | ||
admin true | ||
admin { true } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :icla do | ||
head 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod' | ||
body 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod' | ||
version ENV['ICLA_VERSION'] | ||
head { 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod' } | ||
body { 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod' } | ||
version { ENV['ICLA_VERSION'] } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :icla_signature do | ||
association :user | ||
|
||
prefix 'Mr.' | ||
first_name 'John' | ||
middle_name 'A.' | ||
last_name 'Doe' | ||
suffix 'Sr.' | ||
phone '1234567890' | ||
email 'jdoe@example.com' | ||
prefix { 'Mr.' } | ||
first_name { 'John' } | ||
middle_name { 'A.' } | ||
last_name { 'Doe' } | ||
suffix { 'Sr.' } | ||
phone { '1234567890' } | ||
email { 'jdoe@example.com' } | ||
|
||
address_line_1 '123 Some Street' | ||
address_line_2 'Apartment #5' | ||
city 'Pittsburgh' | ||
state 'PA' | ||
zip '15213' | ||
country 'United States' | ||
address_line_1 { '123 Some Street' } | ||
address_line_2 { 'Apartment #5' } | ||
city { 'Pittsburgh' } | ||
state { 'PA' } | ||
zip { '15213' } | ||
country { 'United States' } | ||
|
||
agreement '1' | ||
agreement { '1' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :metric_result, class: 'MetricResult' do | ||
association :cookbook_version | ||
association :quality_metric | ||
failure true | ||
feedback 'it failed' | ||
failure { true } | ||
feedback { 'it failed' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :supported_platform do | ||
name 'ubuntu' | ||
version_constraint '>= 12.04' | ||
name { 'ubuntu' } | ||
version_constraint { '>= 12.04' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FactoryGirl.define do | ||
FactoryBot.define do | ||
factory :tool do | ||
association :owner, factory: :user | ||
sequence(:name) { |n| "butter-#{n}" } | ||
type 'ohai_plugin' | ||
description 'Great plugin for ohai.' | ||
source_url 'http://example.com' | ||
instructions 'Use with caution.' | ||
type { 'ohai_plugin' } | ||
description { 'Great plugin for ohai.' } | ||
source_url { 'http://example.com' } | ||
instructions { 'Use with caution.' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.