diff options
| author | realtradam <[email protected]> | 2022-01-20 22:41:04 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-01-20 22:41:04 -0500 |
| commit | 9ae334ecc6aaef009f14c0bb8b57afcb721f709b (patch) | |
| tree | d1d41747a0a4fcde281919933ce59757a4b5e7ce /spec | |
| parent | f003a1acc5dac70b267685701a3b130773310e0b (diff) | |
| download | FelECS-9ae334ecc6aaef009f14c0bb8b57afcb721f709b.tar.gz FelECS-9ae334ecc6aaef009f14c0bb8b57afcb721f709b.zip | |
rename to FelECS
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/component_manager_spec.rb | 52 | ||||
| -rw-r--r-- | spec/entity_manager_spec.rb | 38 | ||||
| -rw-r--r-- | spec/order_spec.rb | 18 | ||||
| -rw-r--r-- | spec/scene_manager_spec.rb | 14 | ||||
| -rw-r--r-- | spec/stage_manager_spec.rb | 40 | ||||
| -rw-r--r-- | spec/system_manager_spec.rb | 74 |
6 files changed, 118 insertions, 118 deletions
diff --git a/spec/component_manager_spec.rb b/spec/component_manager_spec.rb index 9bf9b9e..bd1df38 100644 --- a/spec/component_manager_spec.rb +++ b/spec/component_manager_spec.rb @@ -1,22 +1,22 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' describe 'Components' do # let :component_manager do - # @component_manager ||= FelFlame::Components.new('TestComponents', :param1, param2: 'def') + # @component_manager ||= FelECS::Components.new('TestComponents', :param1, param2: 'def') # end before :all do - @component_manager ||= FelFlame::Components.new('TestComponents', :param1, param2: 'def') + @component_manager ||= FelECS::Components.new('TestComponents', :param1, param2: 'def') end before :each do @orig_stderr = $stderr $stderr = StringIO.new - @ent0 = FelFlame::Entities.new - @ent1 = FelFlame::Entities.new - @ent2 = FelFlame::Entities.new + @ent0 = FelECS::Entities.new + @ent1 = FelECS::Entities.new + @ent2 = FelECS::Entities.new @cmp0 = @component_manager.new @cmp1 = @component_manager.new @cmp2 = @component_manager.new @@ -24,7 +24,7 @@ describe 'Components' do after :each do $stderr = @orig_stderr - FelFlame::Entities.reverse_each(&:delete) + FelECS::Entities.reverse_each(&:delete) @component_manager.reverse_each(&:delete) end @@ -57,19 +57,19 @@ describe 'Components' do end it 'Component module responds to array methods' do - expect(FelFlame::Components.respond_to?(:[])).to be true - expect(FelFlame::Components.respond_to?(:each)).to be true - FelFlame::Components.each do |component_manager| + expect(FelECS::Components.respond_to?(:[])).to be true + expect(FelECS::Components.respond_to?(:each)).to be true + FelECS::Components.each do |component_manager| expect(component_manager.respond_to?(:addition_triggers)).to be true end - expect(FelFlame::Components.respond_to?(:filter)).to be true - expect(FelFlame::Components.respond_to?(:first)).to be true - expect(FelFlame::Components.respond_to?(:last)).to be true - expect(FelFlame::Components.respond_to?(:somethingwrong)).to be false + expect(FelECS::Components.respond_to?(:filter)).to be true + expect(FelECS::Components.respond_to?(:first)).to be true + expect(FelECS::Components.respond_to?(:last)).to be true + expect(FelECS::Components.respond_to?(:somethingwrong)).to be false end it 'Component module doesnt respond to missing methods' do - expect { FelFlame::Components.somethingwrong }.to raise_error(NoMethodError) + expect { FelECS::Components.somethingwrong }.to raise_error(NoMethodError) end it 'can delete a component' do @@ -84,13 +84,13 @@ describe 'Components' do end it 'can iterate component managers' do - all_components_symbols = FelFlame::Components.constants + all_components_symbols = FelECS::Components.constants all_components = all_components_symbols.map do |symbol| - FelFlame::Components.const_get symbol + FelECS::Components.const_get symbol end - expect(all_components).to eq(FF::Components.each.to_a) + expect(all_components).to eq(FelECS::Components.each.to_a) expect(all_components.length).to be > 0 - expect(FelFlame::Components.each).to be_an Enumerator + expect(FelECS::Components.each).to be_an Enumerator end it 'can change params on initialization' do @@ -130,15 +130,15 @@ describe 'Components' do end it 'cant overwrite exiting component managers' do - FelFlame::Components.new('TestComponent1') - expect { FelFlame::Components.new('TestComponent1') }.to raise_error(NameError) + FelECS::Components.new('TestComponent1') + expect { FelECS::Components.new('TestComponent1') }.to raise_error(NameError) end it 'can\'t create an attribute when its name is an existing method' do - # expect { FelFlame::Components.new('TestComponent2', :id) }.to raise_error(NameError) - expect { FelFlame::Components.new('TestComponent2', :addition_triggers) }.to raise_error(NameError) - expect { FelFlame::Components.new('TestComponent2', :removal_triggers) }.to raise_error(NameError) - expect { FelFlame::Components.new('TestComponent2', :attr_triggers) }.to raise_error(NameError) - expect { FelFlame::Components.new('TestComponent3', :same, :same) }.to raise_error(NameError) + # expect { FelECS::Components.new('TestComponent2', :id) }.to raise_error(NameError) + expect { FelECS::Components.new('TestComponent2', :addition_triggers) }.to raise_error(NameError) + expect { FelECS::Components.new('TestComponent2', :removal_triggers) }.to raise_error(NameError) + expect { FelECS::Components.new('TestComponent2', :attr_triggers) }.to raise_error(NameError) + expect { FelECS::Components.new('TestComponent3', :same, :same) }.to raise_error(NameError) end end diff --git a/spec/entity_manager_spec.rb b/spec/entity_manager_spec.rb index 2068986..25afa45 100644 --- a/spec/entity_manager_spec.rb +++ b/spec/entity_manager_spec.rb @@ -1,21 +1,21 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' # class EntitiesTest < Minitest::Test describe 'Entities' do before :all do $VERBOSE = nil - @component_manager ||= FelFlame::Components.new('TestEntity', :param1, param2: 'def') + @component_manager ||= FelECS::Components.new('TestEntity', :param1, param2: 'def') end before :each do @orig_stderr = $stderr $stderr = StringIO.new - @ent0 = FelFlame::Entities.new - @ent1 = FelFlame::Entities.new - @ent2 = FelFlame::Entities.new + @ent0 = FelECS::Entities.new + @ent1 = FelECS::Entities.new + @ent2 = FelECS::Entities.new @cmp0 = @component_manager.new @cmp1 = @component_manager.new @cmp2 = @component_manager.new @@ -23,7 +23,7 @@ describe 'Entities' do after :each do $stderr = @orig_stderr - FelFlame::Entities.reverse_each(&:delete) + FelECS::Entities.reverse_each(&:delete) @component_manager.reverse_each(&:delete) end @@ -43,19 +43,19 @@ describe 'Entities' do end it 'responds to array methods' do - expect(FelFlame::Entities.respond_to?(:[])).to be true - expect(FelFlame::Entities.respond_to?(:each)).to be true - FelFlame::Entities.each do |entity| + expect(FelECS::Entities.respond_to?(:[])).to be true + expect(FelECS::Entities.respond_to?(:each)).to be true + FelECS::Entities.each do |entity| expect(entity.respond_to?(:components)).to be true end - expect(FelFlame::Entities.respond_to?(:filter)).to be true - expect(FelFlame::Entities.respond_to?(:first)).to be true - expect(FelFlame::Entities.respond_to?(:last)).to be true - expect(FelFlame::Entities.respond_to?(:somethingwrong)).to be false + expect(FelECS::Entities.respond_to?(:filter)).to be true + expect(FelECS::Entities.respond_to?(:first)).to be true + expect(FelECS::Entities.respond_to?(:last)).to be true + expect(FelECS::Entities.respond_to?(:somethingwrong)).to be false end it 'dont respond to missing methods' do - expect { FelFlame::Entities.somethingwrong }.to raise_error(NoMethodError) + expect { FelECS::Entities.somethingwrong }.to raise_error(NoMethodError) end it 'won\'t add duplicate entities' do @@ -64,9 +64,9 @@ describe 'Entities' do end it 'can be accessed' do - expect(FelFlame::Entities[0].respond_to?(:components)).to eq(true) - expect(FelFlame::Entities[1].respond_to?(:components)).to eq(true) - expect(FelFlame::Entities[2].respond_to?(:components)).to eq(true) + expect(FelECS::Entities[0].respond_to?(:components)).to eq(true) + expect(FelECS::Entities[1].respond_to?(:components)).to eq(true) + expect(FelECS::Entities[2].respond_to?(:components)).to eq(true) end it 'can have components attached' do @@ -108,7 +108,7 @@ describe 'Entities' do expect(@component_manager.empty?).to be true expect(@ent0.components).to eq({}) expect(@ent2.components).to eq({}) - FelFlame::Entities.reverse_each(&:delete) - expect(FelFlame::Entities.empty?).to be true + FelECS::Entities.reverse_each(&:delete) + expect(FelECS::Entities.empty?).to be true end end diff --git a/spec/order_spec.rb b/spec/order_spec.rb index fd104fc..0d89f15 100644 --- a/spec/order_spec.rb +++ b/spec/order_spec.rb @@ -1,24 +1,24 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' # class EntitiesTest < Minitest::Test describe 'Order' do before :all do @result = [] - @system0 = FelFlame::Systems.new('System1', priority: 0) do + @system0 = FelECS::Systems.new('System1', priority: 0) do @result.push 0 end - @system2 = FelFlame::Systems.new('System3', priority: 2) do + @system2 = FelECS::Systems.new('System3', priority: 2) do @result.push 2 end - @system1 = FelFlame::Systems.new('System2', priority: 1) do + @system1 = FelECS::Systems.new('System2', priority: 1) do @result.push 1 end - @scene1 = FelFlame::Scenes.new('Scene0', priority: 1) - @scene0 = FelFlame::Scenes.new('Scene0', priority: 0) + @scene1 = FelECS::Scenes.new('Scene0', priority: 1) + @scene0 = FelECS::Scenes.new('Scene0', priority: 0) end before :each do @@ -38,7 +38,7 @@ describe 'Order' do it 'can sort Scenes' do @scene0.add @system0 @scene1.add @system1 - FelFlame::Order.sort( + FelECS::Order.sort( @scene1, @scene0 ) @@ -47,7 +47,7 @@ describe 'Order' do it 'can sort Systems' do @scene0.add @system0, @system1, @system2 - FelFlame::Order.sort( + FelECS::Order.sort( @system2, @system0, @system1 @@ -57,7 +57,7 @@ describe 'Order' do end it 'can handle array' do - FelFlame::Order.sort( + FelECS::Order.sort( @system0, [ @system1, diff --git a/spec/scene_manager_spec.rb b/spec/scene_manager_spec.rb index e1984dc..51d74ef 100644 --- a/spec/scene_manager_spec.rb +++ b/spec/scene_manager_spec.rb @@ -1,28 +1,28 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' # class EntitiesTest < Minitest::Test describe 'Scenes' do before :all do - @component_manager ||= FelFlame::Components.new('TestScenes', order: []) - @system2 = FelFlame::Systems.new('Test', priority: 2) do + @component_manager ||= FelECS::Components.new('TestScenes', order: []) + @system2 = FelECS::Systems.new('Test', priority: 2) do @component_manager.each do |component| component.order.push 2 end end - @system1 = FelFlame::Systems.new('Mana', priority: 1) do + @system1 = FelECS::Systems.new('Mana', priority: 1) do @component_manager.each do |component| component.order.push 1 end end - @system3 = FelFlame::Systems.new('Spell', priority: 3) do + @system3 = FelECS::Systems.new('Spell', priority: 3) do @component_manager.each do |component| component.order.push 3 end end - @scene = FelFlame::Scenes.new('TestScene') + @scene = FelECS::Scenes.new('TestScene') end before :each do @@ -30,7 +30,7 @@ describe 'Scenes' do end after :each do - FelFlame::Entities.each(&:delete) + FelECS::Entities.each(&:delete) @component_manager.each(&:delete) @scene.clear end diff --git a/spec/stage_manager_spec.rb b/spec/stage_manager_spec.rb index 16f9080..928f4c1 100644 --- a/spec/stage_manager_spec.rb +++ b/spec/stage_manager_spec.rb @@ -1,27 +1,27 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' # class EntitiesTest < Minitest::Test describe 'Stage' do before :all do - @component_manager ||= FelFlame::Components.new('TestStage', order: []) - @system2 = FelFlame::Systems.new('StageTest', priority: 1) do + @component_manager ||= FelECS::Components.new('TestStage', order: []) + @system2 = FelECS::Systems.new('StageTest', priority: 1) do @component_manager.first.order.push 2 end - @system1 = FelFlame::Systems.new('StageMana', priority: 3) do + @system1 = FelECS::Systems.new('StageMana', priority: 3) do @component_manager.first.order.push 1 end - @system3 = FelFlame::Systems.new('StageSpell', priority: 2) do + @system3 = FelECS::Systems.new('StageSpell', priority: 2) do @scene1.add @system1 @scene2.add @system2 @scene3.add @system3 @component_manager.first.order.push 3 end - @scene1 = FelFlame::Scenes.new('TestStage1', priority: 1) - @scene2 = FelFlame::Scenes.new('TestStage2', priority: 2) - @scene3 = FelFlame::Scenes.new('TestStage3', priority: 3) + @scene1 = FelECS::Scenes.new('TestStage1', priority: 1) + @scene2 = FelECS::Scenes.new('TestStage2', priority: 2) + @scene3 = FelECS::Scenes.new('TestStage3', priority: 3) end before :each do @@ -29,37 +29,37 @@ describe 'Stage' do end after :each do - FelFlame::Entities.reverse_each(&:delete) + FelECS::Entities.reverse_each(&:delete) @component_manager.reverse_each(&:delete) @scene1.clear @scene2.clear @scene3.clear - FelFlame::Stage.clear + FelECS::Stage.clear end it 'can add Scenes' do - FelFlame::Stage.add @scene2, @scene1, @scene3 - expect(FelFlame::Stage.scenes).to eq([@scene1, @scene2, @scene3]) + FelECS::Stage.add @scene2, @scene1, @scene3 + expect(FelECS::Stage.scenes).to eq([@scene1, @scene2, @scene3]) end it 'can remove Scenes' do - FelFlame::Stage.add @scene1, @scene2, @scene3 - FelFlame::Stage.remove @scene1, @scene3 - expect(FelFlame::Stage.scenes).to eq([@scene2]) + FelECS::Stage.add @scene1, @scene2, @scene3 + FelECS::Stage.remove @scene1, @scene3 + expect(FelECS::Stage.scenes).to eq([@scene2]) end it 'can clear Scenes' do - FelFlame::Stage.add @scene1, @scene2, @scene3 - FelFlame::Stage.clear - expect(FelFlame::Stage.scenes).to eq([]) + FelECS::Stage.add @scene1, @scene2, @scene3 + FelECS::Stage.clear + expect(FelECS::Stage.scenes).to eq([]) end it 'can call Scenes in correct order' do - FelFlame::Stage.add @scene2, @scene1, @scene3 + FelECS::Stage.add @scene2, @scene1, @scene3 @scene1.add @system1 @scene2.add @system2 @scene3.add @system3 - FelFlame::Stage.call + FelECS::Stage.call expect(@component_manager.first.order).to eq([1, 2, 3]) end end diff --git a/spec/system_manager_spec.rb b/spec/system_manager_spec.rb index b7177af..3b36d34 100644 --- a/spec/system_manager_spec.rb +++ b/spec/system_manager_spec.rb @@ -1,16 +1,16 @@ # frozen_string_literal: true -require_relative '../lib/felflame' +require_relative '../lib/felecs' describe 'Systems' do before :all do - @component_manager ||= FelFlame::Components.new('TestSystems', health: 10, whatever: 'imp', mana: 10) + @component_manager ||= FelECS::Components.new('TestSystems', health: 10, whatever: 'imp', mana: 10) @@testitr = 999 end before :each do @@testitr += 1 - @system = FelFlame::Systems.new "Test#{@@testitr}" do + @system = FelECS::Systems.new "Test#{@@testitr}" do @component_manager.each do |component| component.health += 5 end @@ -19,13 +19,13 @@ describe 'Systems' do after :each do @component_manager.each(&:delete) - FelFlame::Entities.each(&:delete) - FelFlame::Systems.each(&:clear_triggers) + FelECS::Entities.each(&:delete) + FelECS::Systems.each(&:clear_triggers) end it 'can create a system' do @@testitr += 1 - sys = FelFlame::Systems.new("Test#{@@testitr}") do + sys = FelECS::Systems.new("Test#{@@testitr}") do 'Works' end expect(sys.call).to eq('Works') @@ -39,19 +39,19 @@ describe 'Systems' do end it 'responds to array methods' do - expect(FelFlame::Systems.respond_to?(:[])).to be true - expect(FelFlame::Systems.respond_to?(:each)).to be true - FelFlame::Systems.each do |system| + expect(FelECS::Systems.respond_to?(:[])).to be true + expect(FelECS::Systems.respond_to?(:each)).to be true + FelECS::Systems.each do |system| expect(system.respond_to?(:call)).to be true end - expect(FelFlame::Systems.respond_to?(:filter)).to be true - expect(FelFlame::Systems.respond_to?(:first)).to be true - expect(FelFlame::Systems.respond_to?(:last)).to be true - expect(FelFlame::Systems.respond_to?(:somethingwrong)).to be false + expect(FelECS::Systems.respond_to?(:filter)).to be true + expect(FelECS::Systems.respond_to?(:first)).to be true + expect(FelECS::Systems.respond_to?(:last)).to be true + expect(FelECS::Systems.respond_to?(:somethingwrong)).to be false end it 'dont respond to missing methods' do - expect { FelFlame::Systems.somethingwrong }.to raise_error(NoMethodError) + expect { FelECS::Systems.somethingwrong }.to raise_error(NoMethodError) end it 'can manipulate components' do @@ -92,8 +92,8 @@ describe 'Systems' do @system.trigger_when_added @cmp0 expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) - @entity0 = FelFlame::Entities.new - @entity1 = FelFlame::Entities.new @cmp0 + @entity0 = FelECS::Entities.new + @entity1 = FelECS::Entities.new @cmp0 expect(@cmp0.health).to eq(15) expect(@cmp1.health).to eq(25) @entity0.add @cmp0 @@ -107,8 +107,8 @@ describe 'Systems' do @system.trigger_when_added @component_manager expect(@cmp1.health).to eq(10) expect(@cmp2.health).to eq(20) - @entity1 = FelFlame::Entities.new - @entity2 = FelFlame::Entities.new @cmp2 + @entity1 = FelECS::Entities.new + @entity2 = FelECS::Entities.new @cmp2 expect(@cmp1.health).to eq(15) expect(@cmp2.health).to eq(25) @system.trigger_when_added @cmp1 @@ -123,8 +123,8 @@ describe 'Systems' do @system.trigger_when_removed @cmp0 expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) - @entity0 = FelFlame::Entities.new - @entity1 = FelFlame::Entities.new @cmp0 + @entity0 = FelECS::Entities.new + @entity1 = FelECS::Entities.new @cmp0 expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) @entity1.remove @cmp0 @@ -147,8 +147,8 @@ describe 'Systems' do @system.trigger_when_removed @component_manager expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) - @entity0 = FelFlame::Entities.new - @entity1 = FelFlame::Entities.new @cmp0 + @entity0 = FelECS::Entities.new + @entity1 = FelECS::Entities.new @cmp0 expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) @entity1.remove @cmp0 @@ -172,8 +172,8 @@ describe 'Systems' do @system.trigger_when_is_changed @cmp0, :whatever expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) - @entity0 = FelFlame::Entities.new - @entity1 = FelFlame::Entities.new @cmp0 + @entity0 = FelECS::Entities.new + @entity1 = FelECS::Entities.new @cmp0 expect(@cmp0.health).to eq(10) expect(@cmp1.health).to eq(20) @cmp0.whatever = 'different' @@ -187,7 +187,7 @@ describe 'Systems' do it 'can clear all triggers' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_added @cmp0 @system.trigger_when_added @component_manager @system.trigger_when_removed @cmp0 @@ -208,7 +208,7 @@ describe 'Systems' do it 'can clear individual attr_triggers, without component or manager' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @cmp0, :whatever @system.trigger_when_is_changed @component_manager, :whatever @system.trigger_when_is_changed @cmp0, :mana @@ -229,7 +229,7 @@ describe 'Systems' do it 'can clear individual attr_triggers, with component' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @cmp0, :whatever @system.trigger_when_is_changed @cmp0, :mana # expect(@system.attr_triggers).to eq({@cmp0 => [:name, :mana]}) @@ -252,7 +252,7 @@ describe 'Systems' do it 'can clear individual attr_triggers, with manager' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @component_manager, :whatever @system.trigger_when_is_changed @component_manager, :mana @system.clear_triggers :attr_triggers, :whatever, component_or_manager: @component_manager @@ -271,7 +271,7 @@ describe 'Systems' do it 'can clear all attr_triggers, without component or manager' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @component_manager, :whatever @system.trigger_when_is_changed @cmp1, :mana @system.clear_triggers :attr_triggers @@ -290,7 +290,7 @@ describe 'Systems' do it 'can clear all attr_triggers, with component' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @component_manager, :whatever @system.trigger_when_is_changed @cmp1, :mana @system.clear_triggers :attr_triggers, component_or_manager: @cmp1 @@ -309,7 +309,7 @@ describe 'Systems' do it 'can clear all attr_triggers, with manager' do @cmp0 = @component_manager.new health: 10, mana: 10 @cmp1 = @component_manager.new health: 20, mana: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_is_changed @component_manager, :whatever @system.trigger_when_is_changed @cmp1, :mana @system.clear_triggers :attr_triggers, component_or_manager: @component_manager @@ -328,7 +328,7 @@ describe 'Systems' do it 'can clear addition_trigger, without component or manager' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_added @cmp0 @system.trigger_when_added @component_manager @system.clear_triggers(:addition_triggers) @@ -343,7 +343,7 @@ describe 'Systems' do it 'can clear addition_trigger, with component' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_added @cmp0 @system.clear_triggers :addition_triggers, component_or_manager: @cmp0 expect(@cmp0.health).to eq(10) @@ -357,7 +357,7 @@ describe 'Systems' do it 'can clear addition_trigger, with manager' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_added @component_manager @system.clear_triggers :addition_triggers, component_or_manager: @component_manager expect(@cmp0.health).to eq(10) @@ -371,7 +371,7 @@ describe 'Systems' do it 'can clear removal_trigger, without component or manager' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_removed @cmp0 @system.trigger_when_removed @component_manager @system.clear_triggers(:removal_triggers) @@ -386,7 +386,7 @@ describe 'Systems' do it 'can clear removal_trigger, with component' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_removed @cmp0 @system.clear_triggers :removal_triggers, component_or_manager: @cmp0 expect(@cmp0.health).to eq(10) @@ -400,7 +400,7 @@ describe 'Systems' do it 'can clear removal_trigger, with manager' do @cmp0 = @component_manager.new health: 10 @cmp1 = @component_manager.new health: 20 - @entity1 = FelFlame::Entities.new + @entity1 = FelECS::Entities.new @system.trigger_when_removed @component_manager @system.clear_triggers :removal_triggers, component_or_manager: @component_manager expect(@cmp0.health).to eq(10) |
