summaryrefslogtreecommitdiffhomepage
path: root/spec
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-12-30 08:14:54 -0500
committerrealtradam <[email protected]>2021-12-30 08:14:54 -0500
commit6f8c1fea6d5925c2f1ccac2918a13cbf6eac9932 (patch)
tree555d2924a3def097c175914170634b0ec63ad0c8 /spec
parentdaea6c2d2aa595abff590e73d7b34e338df705cf (diff)
downloadFelECS-6f8c1fea6d5925c2f1ccac2918a13cbf6eac9932.tar.gz
FelECS-6f8c1fea6d5925c2f1ccac2918a13cbf6eac9932.zip
wip
Diffstat (limited to 'spec')
-rw-r--r--spec/scene_manager_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/scene_manager_spec.rb b/spec/scene_manager_spec.rb
index 65666c7..a9f1064 100644
--- a/spec/scene_manager_spec.rb
+++ b/spec/scene_manager_spec.rb
@@ -35,6 +35,9 @@ describe 'Scenes' do
it 'can add Systems' do
@scene.add @system2, @system3, @system1
+ expect(@system1.scenes.length).to eq(1)
+ expect(@system2.scenes.length).to eq(1)
+ expect(@system3.scenes.length).to eq(1)
expect(@scene.systems).to eq([@system1, @system2, @system3])
end
@@ -47,6 +50,9 @@ describe 'Scenes' do
it 'can clear Systems' do
@scene.add @system2, @system3, @system1
@scene.clear
+ expect(@system1.scenes.length).to eq(0)
+ expect(@system2.scenes.length).to eq(0)
+ expect(@system3.scenes.length).to eq(0)
expect(@scene.systems).to eq([])
end
@@ -60,5 +66,9 @@ describe 'Scenes' do
@scene.add @system2, @system3, @system1
@scene.call
expect(@cmp.order).to eq([1, 2, 3])
+ @cmp.order = []
+ @system3.priority = -1
+ @scene.call
+ expect(@cmp.order).to eq([3, 1, 2])
end
end