Sha256: 5d097684adc42020392c0c974661fe41a0db098cfdea9d60271a62b483b3a965

Contents?: true

Size: 655 Bytes

Versions: 2

Compression:

Stored size: 655 Bytes

Contents

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

describe 'class_self matcher' do    
  context "content without class << self" do
    not_class_self = %q{
        def hello
        end}    
    
    it "should not have class << self" do            
      not_class_self.should_not have_class_self
    end
  end
  
  context "content with class << self" do  
    class_self = %q{
      class << self
        def hello
        end
      end # class self}    

    it "should have class << self" do            
      class_self.should have_class_self do |content|
        puts "content: #{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/class_self_spec.rb
generator-spec-0.4.8 spec/generator_spec/matchers/content/class_self_spec.rb