lib/meibo/factory_bot/classroom.rb in meibo-0.8.0 vs lib/meibo/factory_bot/classroom.rb in meibo-0.9.0
- old
+ new
@@ -17,12 +17,19 @@
sequence(:title) {|n| "#{n}組" }
course_sourced_id { course&.sourced_id }
class_type { Meibo::Classroom::TYPES[:homeroom] }
school_sourced_id { school&.sourced_id }
term_sourced_ids { terms.map(&:sourced_id) }
- special_needs { false }
+ trait :jp do
+ initialize_with { Meibo::JapanProfile::Classroom.new(**attributes) }
+ end
+
trait :special_needs do
special_needs { true }
+ end
+
+ trait :no_special_needs do
+ special_needs { false }
end
end
end