lawrencepit-autocode 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/test/autocreate.rb +17 -0
- metadata +1 -1
data/test/autocreate.rb
CHANGED
@@ -40,4 +40,21 @@ describe "A module where autocreate has been called" do
|
|
40
40
|
Duffel.unload
|
41
41
|
end
|
42
42
|
|
43
|
+
it "should be possible to include autocode" do
|
44
|
+
module Waves
|
45
|
+
include Autocode
|
46
|
+
autocreate(:TestLib, Module.new) do
|
47
|
+
include Autocode
|
48
|
+
autocreate_class
|
49
|
+
autoload_class
|
50
|
+
end
|
51
|
+
end
|
52
|
+
Waves::TestLib::TheOneAndOnlyClass.help().should == "class help"
|
53
|
+
Waves::TestLib::AnyThing.name.should == "Waves::TestLib::AnyThing"
|
54
|
+
lambda { Waves::TestLib::TheOneAndOnlyModule }.should.raise TypeError
|
55
|
+
Waves::TestLib::ThePretender.name.should == "Waves::TestLib::ThePretender"
|
56
|
+
lambda { Waves::TestLib::ThePretender.help() }.should.raise NoMethodError
|
57
|
+
Waves.unload
|
58
|
+
end
|
59
|
+
|
43
60
|
end
|