spec/sugar-high/module_spec.rb in sugar-high-0.1.0 vs spec/sugar-high/module_spec.rb in sugar-high-0.1.1
- old
+ new
@@ -9,16 +9,26 @@
modules :x, :y do
nested_modules :a, :b
end
end
+module AuthAssistant
+ NAMESPACES = [:view, :controller, :model, :link, :helper]
+ modules NAMESPACES
+end
+
describe "SugarHigh" do
describe "Module ext" do
describe '#modules' do
it "should create namespaces under Simple for modules X and Y" do
Simple::X.should_not be_nil
Simple::Y.should_not be_nil
+ end
+
+ it "should create namespaces under AuthAssistant for various modules" do
+ AuthAssistant::View.should_not be_nil
+ AuthAssistant::Helper.should_not be_nil
end
it "should create namespaces under Nested for modules X and Y, and modules A and B under each of those X and Y modules" do
Nested::X.should_not be_nil
Nested::Y.should_not be_nil