aboutsummaryrefslogtreecommitdiffstats
path: root/spec/input_spec.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-04-24 21:52:58 +0000
committers-ol <s-ol@users.noreply.github.com>2020-04-26 09:36:07 +0000
commit7fa72077cad3401a7d83d75a4b1f0198cdd9036f (patch)
tree7e11b4e2d4e2a65e3c2adced29921227761f8f12 /spec/input_spec.moon
parentfix registry/module bugs (diff)
downloadalive-7fa72077cad3401a7d83d75a4b1f0198cdd9036f.tar.gz
alive-7fa72077cad3401a7d83d75a4b1f0198cdd9036f.zip
fix existing tests
Diffstat (limited to 'spec/input_spec.moon')
-rw-r--r--spec/input_spec.moon16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/input_spec.moon b/spec/input_spec.moon
index 9a380f1..6ab4388 100644
--- a/spec/input_spec.moon
+++ b/spec/input_spec.moon
@@ -1,11 +1,7 @@
+import do_setup from require 'spec.test_setup'
import Input, Result, ValueStream, EventStream, IOStream from require 'alv.base'
-import SimpleRegistry from require 'alv'
-import Logger from require 'alv.logger'
-Logger\init 'silent'
-reg = SimpleRegistry!
-setup -> reg\grab!
-teardown -> reg\release!
+setup do_setup
class MyIO extends IOStream
new: => super 'my-io'
@@ -65,7 +61,7 @@ describe 'Input.hot', ->
assert.is.false input\dirty!
input\finish_setup!
- reg\next_tick!
+ COPILOT\next_tick!
stream\add 1
assert.is.true input\dirty!
@@ -97,7 +93,7 @@ describe 'Input.hot', ->
assert.is.false input\dirty!
input\finish_setup!
- reg\next_tick!
+ COPILOT\next_tick!
stream.is_dirty = true
assert.is.true input\dirty!
@@ -133,7 +129,7 @@ describe 'Input.hot', ->
newinput\finish_setup!
it 'is not dirty when equal', ->
- newval = ValueStream.num 1
+ newval = ValueStream.num!
newval\set 1
assert.is.true newval\dirty!
@@ -148,6 +144,6 @@ describe 'Input.hot', ->
assert.is.true stream\dirty!
assert.is.true input\dirty!
- reg\next_tick!
+ COPILOT\next_tick!
assert.is.false stream\dirty!
assert.is.false input\dirty!