Factory.define :problem do |m|
m.label "label"
- m.unit "unit"
m.level 1
m.amount 2
m.options({ :term_number => 2, :operators => %w[+ - * div] }.to_json)
end
-Factory.define :ordinary_arithmetic, :parent => :problem do |m|
- m.unit "ordinary_arithmetic"
+Factory.define :ordinary_arithmetic_level_1, :parent => :problem do |m|
+ m.unit{|u| u.association(:ordinary_arithmetic) }
m.level 1
m.options({
:minus => true, :min => 0, :max => 100,
}.to_json)
end
-Factory.define :decimal_arithmetic, :parent => :problem do |m|
- m.unit "decimal_arithmetic"
+Factory.define :decimal_arithmetic_level_1, :parent => :problem do |m|
+ m.unit{|u| u.association "decimal_arithmetic" }
m.level 1
m.options({
:minus => true, :digits => 2, :min => 0, :max => 10.0,
}.to_json)
end
-Factory.define :fractional_arithmetic, :parent => :problem do |m|
- m.unit "fractional_arithmetic"
+Factory.define :fractional_arithmetic_level_1, :parent => :problem do |m|
+ m.unit{ u.association "fractional_arithmetic" }
m.level 1
m.options({
:minus => true,
}.to_json)
end
-Factory.define :factorization, :parent => :problem do |m|
- m.unit "factorization"
+Factory.define :factorization_level_1, :parent => :problem do |m|
+ m.unit{|u| u.association "factorization" }
m.level 1
m.options({
:order_min => 2, :order_max => 3, :x => %w[x y z],
}.to_json)
end
-Factory.define :expansion, :parent => :problem do |m|
- m.unit "expansion"
+Factory.define :expansion_level_1, :parent => :problem do |m|
+ m.unit{|u| u.association "expansion" }
m.level 1
m.options({
:order_min => 2, :order_max => 3, :x => %w[x y z],