Sha256: 6ca455b84b2a6b039bbd9335504e5cfb2f23f1ea61ab1d849cf66f5ac2de3650

Contents?: true

Size: 674 Bytes

Versions: 16

Compression:

Stored size: 674 Bytes

Contents

require 'spec_helper'

describe 'module matcher' do    
  context "content without class Hello" do
    no_class = %q{
        module Hello
          def hello
          end
        end}    
    
    it "should not have class Hello" do            
      no_class.should_not have_class :Hello do |content|
        content.should_not be_empty
      end
    end
  end
  
  context "content with class Hello" do
    with_class = %q{
        class Hello
          def hello
          end
        end}    
    
    it "should have class Hello" do            
      with_class.should have_class :Hello do |content|
        content.should_not be_empty
      end
    end
  end
end



Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
code-spec-0.4.0 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.3.0 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.11 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.9 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.8 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.7 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.6 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.5 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.4 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.3 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.2 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.1 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.2.0 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.1.3 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.1.2 spec/code-spec/matchers/have_class_spec.rb
code-spec-0.1.0 spec/code-spec/matchers/have_class_spec.rb