Sha256: 1a62c958e2d0cf39460c56c3464644b236815a78aad2ca034d48d58aa22aaaf3

Contents?: true

Size: 806 Bytes

Versions: 53

Compression:

Stored size: 806 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")

module RR
  module WildcardMatchers
    describe IsA do
      attr_reader :matcher
      before do
        @matcher = IsA.new(Symbol)
      end

      describe "#wildcard_match?" do
        context "when passed an instance of the expected Module" do
          it "returns true" do
            matcher.should be_wildcard_match(:a_symbol)
          end
        end

        context "when not passed an instance of the expected Module" do
          it "returns false" do
            matcher.should_not be_wildcard_match("not a symbol")
          end
        end
      end

      describe "#inspect" do
        it "returns the is_a(ClassName)" do
          matcher.inspect.should == "is_a(Symbol)"
        end
      end
    end
  end
end

Version data entries

53 entries across 49 versions & 9 rubygems

Version Path
adva-0.2.4 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.2.3 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.2.2 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.2.1 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.2.0 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.1.4 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.1.3 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.1.2 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.1.1 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.1.0 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
adva-0.0.1 test/rr/spec/rr/wildcard_matchers/is_a_spec.rb
jferris-rr-0.7.1.0.1239654108 spec/rr/wildcard_matchers/is_a_spec.rb
redinger-redinger-rr-0.10.3 spec/rr/wildcard_matchers/is_a_spec.rb
redinger-rr-0.10.4 spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/wildcard_matchers/is_a_spec.rb