Sha256: 7ae4c2ed7eb459288b30318e9c891fc18eb20432600fdcb617f88f75e0cacb37

Contents?: true

Size: 1.1 KB

Versions: 49

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'
require 'sugar-high/module'

module Simple
  modules :x, :y    
end

module Nested
  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        

        Nested::X::A.should_not be_nil
        Nested::Y::A.should_not be_nil        

        Nested::X::B.should_not be_nil
        Nested::Y::B.should_not be_nil        
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
sugar-high-0.4.3 spec/sugar-high/module_spec.rb
sugar-high-0.4.0 spec/sugar-high/module_spec.rb
sugar-high-0.3.7 spec/sugar-high/module_spec.rb
sugar-high-0.3.6 spec/sugar-high/module_spec.rb
sugar-high-0.3.5 spec/sugar-high/module_spec.rb
sugar-high-0.3.4 spec/sugar-high/module_spec.rb
sugar-high-0.3.3 spec/sugar-high/module_spec.rb
sugar-high-0.3.2 spec/sugar-high/module_spec.rb
sugar-high-0.3.1 spec/sugar-high/module_spec.rb
sugar-high-0.3.0 spec/sugar-high/module_spec.rb
sugar-high-0.2.12 spec/sugar-high/module_spec.rb
sugar-high-0.2.11 spec/sugar-high/module_spec.rb
sugar-high-0.2.10 spec/sugar-high/module_spec.rb
sugar-high-0.2.9 spec/sugar-high/module_spec.rb
sugar-high-0.2.8 spec/sugar-high/module_spec.rb
sugar-high-0.2.7 spec/sugar-high/module_spec.rb
sugar-high-0.2.6 spec/sugar-high/module_spec.rb
sugar-high-0.2.5 spec/sugar-high/module_spec.rb
sugar-high-0.2.4 spec/sugar-high/module_spec.rb
sugar-high-0.2.2 spec/sugar-high/module_spec.rb