Sha256: 4a49bcc93946ebe8e599819ae7010766784bef968bb7f1186181604c008f6b90

Contents?: true

Size: 823 Bytes

Versions: 1

Compression:

Stored size: 823 Bytes

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


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

1 entries across 1 versions & 1 rubygems

Version Path
sugar-high-0.1.0 spec/sugar-high/module_spec.rb