Sha256: edae65665dd6cbcee948994335df8504289e9a6d9503b644c97c3a31fb408416

Contents?: true

Size: 790 Bytes

Versions: 1

Compression:

Stored size: 790 Bytes

Contents

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

describe 'include module matcher' do    
  context "content without include Greeting" do
    no_include = %q{
        class Hello < Greeting
          def hello
          end
        end}    
    
    it "should not have include Greeting" do            
      no_include.should_not include_module :greeting do |content|
        puts content
      end
    end
  end
  
  context "content with include Greeting" do
    with_module = %q{
        class Hello
          include Greeting
          
          def hello
          end
        end}    
    
    it "should have include Greeting" do            
      with_module.should include_module :greeting do |content|
        puts content
      end
    end
  end
end



Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generator-spec-0.4.7 spec/generator_spec/matchers/content/include_module_spec.rb