diff --git a/spec/factories/grid_weapons.rb b/spec/factories/grid_weapons.rb index a181f98..765b70c 100644 --- a/spec/factories/grid_weapons.rb +++ b/spec/factories/grid_weapons.rb @@ -1,5 +1,17 @@ +# frozen_string_literal: true + FactoryBot.define do factory :grid_weapon do - + # Associations: assumes that factories for :party and :weapon are defined. + association :party + association :weapon + + # Default attributes + position { 0 } + uncap_level { 3 } + transcendence_step { 0 } + mainhand { false } + + # Optional associations for weapon keys and awakening are left as nil by default. end end diff --git a/spec/factories/parties.rb b/spec/factories/parties.rb index 03627dd..5480b4d 100644 --- a/spec/factories/parties.rb +++ b/spec/factories/parties.rb @@ -1,5 +1,21 @@ +# frozen_string_literal: true + FactoryBot.define do factory :party do - + association :user + + # Use a sequence for unique party names (optional). + sequence(:name) { |n| "Party #{n}" } + description { Faker::Lorem.sentence } + extra { false } + full_auto { false } + auto_guard { false } + charge_attack { true } + clear_time { 0 } + button_count { 0 } + chain_count { 0 } + turn_count { 0 } + visibility { 1 } + # Note: Shortcode and edit_key will be auto-generated via before_create callbacks. end end