gamebox 0.4.0.rc3 → 0.4.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
data/lib/gamebox/spec/helper.rb
CHANGED
@@ -63,6 +63,15 @@ module GameboxSpecHelpers
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
def expects_no_event(target, event_name)
|
67
|
+
args = []
|
68
|
+
target.when event_name do |*event_args|
|
69
|
+
args << event_args
|
70
|
+
end
|
71
|
+
yield
|
72
|
+
args.should be_empty
|
73
|
+
end
|
74
|
+
|
66
75
|
def expects_event(target, event_name, expected_args=[[]])
|
67
76
|
args = []
|
68
77
|
target.when event_name do |*event_args|
|
@@ -108,8 +117,14 @@ module GameboxAcceptanceSpecHelpers
|
|
108
117
|
end
|
109
118
|
|
110
119
|
def update(millis)
|
120
|
+
if @total_millis == 0
|
121
|
+
Gosu.stubs(:milliseconds).returns 0
|
122
|
+
super()
|
123
|
+
end
|
111
124
|
@total_millis += millis
|
112
125
|
Gosu.stubs(:milliseconds).returns @total_millis
|
126
|
+
@first_update = false
|
127
|
+
|
113
128
|
super()
|
114
129
|
end
|
115
130
|
|
data/lib/gamebox/version.rb
CHANGED
@@ -20,10 +20,10 @@ describe HookedGosuWindow do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe "#update" do
|
23
|
-
it '
|
23
|
+
it 'does not fire initial update with full millis' do
|
24
24
|
Gosu.stubs(:milliseconds).returns 58
|
25
25
|
|
26
|
-
|
26
|
+
expects_no_event subject, :update do
|
27
27
|
subject.update
|
28
28
|
end
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.rc4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-05-
|
14
|
+
date: 2012-05-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: gosu
|