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.5.3 spec/sugar-high/module_spec.rb
sugar-high-0.5.1 spec/sugar-high/module_spec.rb
sugar-high-0.5.0 spec/sugar-high/module_spec.rb
sugar-high-0.4.9.5 spec/sugar-high/module_spec.rb
sugar-high-0.4.9.3 spec/sugar-high/module_spec.rb
sugar-high-0.4.9.2 spec/sugar-high/module_spec.rb
sugar-high-0.4.9.1 spec/sugar-high/module_spec.rb
sugar-high-0.4.9 spec/sugar-high/module_spec.rb
sugar-high-0.4.8 spec/sugar-high/module_spec.rb
sugar-high-0.4.7 spec/sugar-high/module_spec.rb
sugar-high-0.4.6.4 spec/sugar-high/module_spec.rb
sugar-high-0.4.6.3 spec/sugar-high/module_spec.rb
sugar-high-0.4.6.2 spec/sugar-high/module_spec.rb
sugar-high-0.4.6.1 spec/sugar-high/module_spec.rb
sugar-high-0.4.6 spec/sugar-high/module_spec.rb
sugar-high-0.4.5.2 spec/sugar-high/module_spec.rb
sugar-high-0.4.5 spec/sugar-high/module_spec.rb
sugar-high-0.4.4.2 spec/sugar-high/module_spec.rb
sugar-high-0.4.4.1 spec/sugar-high/module_spec.rb
sugar-high-0.4.4 spec/sugar-high/module_spec.rb