Sha256: b28c5bf19edb2d0120e8761546dce784b71bbfcd361c483f922ee0ecb6c54d3f

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 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

2 entries across 2 versions & 1 rubygems

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