mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 16:31:38 -04:00
update ruby and gem versions
This commit is contained in:
+15
-16
@@ -16,22 +16,21 @@ FactoryGirl.define do
|
||||
value 200
|
||||
bike_condition { FactoryGirl.create(:bike_condition) }
|
||||
bike_purpose { FactoryGirl.create(:bike_purpose) }
|
||||
end
|
||||
|
||||
factory :seed_bike do
|
||||
sequence(:shop_id) {|n| n}
|
||||
sequence :serial_number do |n|
|
||||
"#{Faker::Code.isbn}-#{n}"
|
||||
factory :seed_bike do
|
||||
sequence(:shop_id) {|n| n}
|
||||
sequence :serial_number do |n|
|
||||
"#{Faker::Code.isbn}-#{n}"
|
||||
end
|
||||
bike_brand_id { BikeBrand.all.sample.id }
|
||||
model { Faker::Commerce.product_name }
|
||||
color { sprintf("%06X", Random.rand(16777215) ) }
|
||||
bike_style_id { BikeStyle.all.sample.id }
|
||||
seat_tube_height { Random.rand(25) }
|
||||
top_tube_length { Random.rand(25) }
|
||||
bike_wheel_size_id { BikeWheelSize.all.sample.id }
|
||||
value { Random.rand(200) }
|
||||
bike_condition_id { BikeCondition.all.sample.id }
|
||||
bike_purpose_id { BikePurpose.all.sample.id }
|
||||
end
|
||||
bike_brand_id { BikeBrand.all.sample.id }
|
||||
model { Faker::Commerce.product_name }
|
||||
color { sprintf("%06X", Random.rand(16777215) ) }
|
||||
bike_style_id { BikeStyle.all.sample.id }
|
||||
seat_tube_height { Random.rand(25) }
|
||||
top_tube_length { Random.rand(25) }
|
||||
bike_wheel_size_id { BikeWheelSize.all.sample.id }
|
||||
value { Random.rand(200) }
|
||||
bike_condition_id { BikeCondition.all.sample.id }
|
||||
bike_purpose_id { BikePurpose.all.sample.id }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,14 +8,14 @@ FactoryGirl.define do
|
||||
first_name 'Michael'
|
||||
last_name 'Scott'
|
||||
sequence(:bike_id) { |n| n }
|
||||
after_build do |r|
|
||||
after(:build) do |r|
|
||||
r.roles << (Role.find_by_role("user") || FactoryGirl.create(:role_user))
|
||||
end
|
||||
|
||||
factory :staff do
|
||||
username "staff"
|
||||
first_name 'Staff'
|
||||
after_build do |r|
|
||||
after(:build) do |r|
|
||||
r.roles << (Role.find_by_role("staff") || FactoryGirl.create(:role_staff))
|
||||
end
|
||||
end
|
||||
@@ -23,7 +23,7 @@ FactoryGirl.define do
|
||||
factory :admin do
|
||||
username "admin"
|
||||
first_name 'Admin'
|
||||
after_build do |r|
|
||||
after(:build) do |r|
|
||||
r.roles << (Role.find_by_role("admin") || FactoryGirl.create(:role_admin))
|
||||
end
|
||||
end
|
||||
@@ -31,7 +31,7 @@ FactoryGirl.define do
|
||||
factory :bike_admin do
|
||||
username "bike_admin"
|
||||
first_name 'BikeAdmin'
|
||||
after_build do |r|
|
||||
after(:build) do |r|
|
||||
r.roles << (Role.find_by_role("bike_admin") || FactoryGirl.create(:role_bike_admin))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user