Sha256: 88a7179748de3d73b9bfbda4a90334b8bd56ecd5f5942072e130f8d097e4e1a5

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')

describe 'module matcher' do    
  context "content without module Hello" do
    no_module = %q{
        class Hello
          def hello
          end
        end}    
    
    it "should not have module Hello" do            
      no_module.should_not have_module :Hello do |content|
        puts content
      end
    end
  end
  
  context "content with module Hello" do
    with_module = %q{
        module Hello
          def hello
          end
        end}    
    
    it "should have module Hello" do            
      with_module.should have_module :Hello do |content|
        puts content
      end
    end
  end
end



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
generator-spec-0.5.0 spec/generator_spec/matchers/content/have_module_spec.rb
generator-spec-0.4.8 spec/generator_spec/matchers/content/have_module_spec.rb