gosu_extensions 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/extensions/module.rb +1 -2
- data/lib/units/thing.rb +1 -1
- data/spec/lib/extensions/module_spec.rb +40 -0
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.13
|
data/lib/extensions/module.rb
CHANGED
data/lib/units/thing.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '/../../spec_helper')
|
2
|
+
|
3
|
+
describe Module do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@module = Module.new do
|
7
|
+
def self.to_s
|
8
|
+
"Bla" # module name in output
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "manual" do
|
14
|
+
it "should define the method" do
|
15
|
+
lambda { @module.manual("some text") }.should_not raise_error
|
16
|
+
end
|
17
|
+
it "should not have a manual! method if the manual method is not called" do
|
18
|
+
lambda { @module.manual! }.should raise_error(NoMethodError)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
describe "manual!" do
|
22
|
+
it "should define such a method" do
|
23
|
+
@module.stub! :puts => :we_are_not_interested_in_this
|
24
|
+
@module.manual "some text"
|
25
|
+
|
26
|
+
lambda { @module.manual! }.should_not raise_error
|
27
|
+
end
|
28
|
+
it "should define such a method which puts a given text, formatted" do
|
29
|
+
@module.should_receive(:puts).once.with <<-EXPECTED
|
30
|
+
MANUAL FOR Bla
|
31
|
+
some text
|
32
|
+
Change Bla.manual! -> Bla, to not show the manual anymore.
|
33
|
+
EXPECTED
|
34
|
+
|
35
|
+
@module.manual "some text"
|
36
|
+
@module.manual!
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 13
|
9
|
+
version: 0.1.13
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Florian Hanke
|
@@ -114,6 +114,7 @@ signing_key:
|
|
114
114
|
specification_version: 3
|
115
115
|
summary: Default extensions built onto the popular Gosu Framework. Uses Chipmunk for game physics. That's it for now. I'm working on them. Anyway, GAME ON!
|
116
116
|
test_files:
|
117
|
+
- spec/lib/extensions/module_spec.rb
|
117
118
|
- spec/lib/extensions/numeric_spec.rb
|
118
119
|
- spec/lib/traits/attachable_spec.rb
|
119
120
|
- spec/lib/traits/damaging_spec.rb
|