lawrencepit-autocode 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|