Skip to content

Commit 09ac3a0

Browse files
committed
hyper-state specs passing
1 parent 9da4b96 commit 09ac3a0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ruby/hyper-state/spec/internal/callbacks_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def wash_hands;end
1313
instance = Foo.new
1414
expect(instance).to respond_to(:wash_hands)
1515
expect(instance).to receive(:wash_hands)
16-
expect(instance.run_callback(:before_dinner)).to eq([:wash_hands])
16+
expect(instance.run_callback(:before_dinner, 1, 2, 3)).to eq([1, 2, 3])
1717
end
1818

1919
# TODO: move all these to run on server as above
@@ -33,8 +33,8 @@ def turn_off_laptop;end
3333
instance = Foo.new
3434
[ instance.respond_to?(:wash_hands),
3535
instance.respond_to?(:turn_off_laptop),
36-
instance.run_callback(:before_dinner) ]
37-
end.to eq([true, true, ["wash_hands", "turn_off_laptop" ]])
36+
instance.run_callback(:before_dinner, 1, 2, 3) ]
37+
end.to eq([true, true, [1, 2, 3]])
3838
end
3939

4040
context 'using Hyperloop::Context.reset!' do
@@ -65,8 +65,8 @@ def turn_off_laptop;end
6565
before_dinner :wash_hands
6666
end
6767

68-
instance.run_callback(:before_dinner)
69-
end.to eq(["wash_hands"])
68+
instance.run_callback(:before_dinner, 1, 2, 3)
69+
end.to eq([1, 2, 3])
7070
end
7171
end
7272

@@ -137,6 +137,6 @@ def eat_ice_cream(a,b,c); end
137137
foo.run_callback(:before_dinner, 1, 2)
138138
res1 = foo.run_callback(:after_dinner, 4, 5, 6)
139139
[res1, foo.lorem]
140-
end.to eq([["eat_ice_cream"], '1-2'])
140+
end.to eq([[4, 5, 6], '1-2'])
141141
end
142142
end

0 commit comments

Comments
 (0)