File tree 2 files changed +16
-15
lines changed
2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 1
1
if Rails . env . development? || Rails . env . test?
2
- require "factory_girl "
2
+ require "factory_bot "
3
3
4
4
namespace :dev do
5
5
desc "Sample data for local development environment"
Original file line number Diff line number Diff line change 1
- FactoryBot . define do factory :submission do
2
- question_id 1
3
- score 1.5
4
- code_submission "MyString"
5
- test_results "MyString"
6
- user_info ""
7
- session_id 1
1
+ FactoryBot . define do
2
+ factory :submission do
3
+ question_id { 1 }
4
+ score { 1.5 }
5
+ code_submission { "MyString" }
6
+ test_results { "MyString" }
7
+ user_info { "" }
8
+ session_id { 1 }
8
9
end
9
10
10
11
factory :question do
11
- title "MyString"
12
- points 1.5
13
- content "MyText"
14
- tests "MyText"
15
- initial_file "MyText"
16
- metadata "MyText"
17
- tags "MyText"
12
+ title { "MyString" }
13
+ points { 1.5 }
14
+ content { "MyText" }
15
+ tests { "MyText" }
16
+ initial_file { "MyText" }
17
+ metadata { "MyText" }
18
+ tags { "MyText" }
18
19
end
19
20
end
You can’t perform that action at this time.
0 commit comments