Sha256: 36c06f66330fbe5a71fd57018b056873672c1510da238e73c5100541290f4d7a

Contents?: true

Size: 1.18 KB

Versions: 21

Compression:

Stored size: 1.18 KB

Contents

require File.expand_path('../../../spec_helper', __FILE__)

module RR
  module WildcardMatchers
    describe Boolean do
      include WildcardMatcherMatchers

      describe '#wildcard_match?' do
        it "returns true when given a Boolean" do
          should wildcard_match(described_class.new)
        end

        it "returns true when given a boolean" do
          should wildcard_match(true)
          should wildcard_match(false)
        end

        it "returns false when not given a boolean" do
          should_not wildcard_match(:something_else)
        end
      end

      describe "#==" do
        it "returns true when given a Boolean" do
          should equal_match(described_class.new)
        end

        it "returns false even when given a boolean that wildcard matches this Boolean" do
          should_not equal_match(true)
          should_not equal_match(false)
        end

        it "returns false when not given a Boolean whatsoever" do
          should_not equal_match(:something_else)
        end
      end

      describe "#inspect" do
        it "returns the correct string" do
          expect(subject.inspect).to eq "boolean"
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rr-3.1.1 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.1.0 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.9 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.8 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.7 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.6 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.5 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.4 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.3 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.2 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.1 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-3.0.0 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.2.1 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.2.0 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.2 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.2.rc1 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.1.rc1 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.0 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.0.rc3 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
rr-1.1.0.rc2 spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb