Sha256: 990296b1005dc731b505261bdb3463794549e9219438eb5026037277c1978bd3

Contents?: true

Size: 1.38 KB

Versions: 11

Compression:

Stored size: 1.38 KB

Contents

require "spec/spec_helper"

module RR
  module Expectations
    describe AnyArgumentExpectation do
      attr_reader :expectation
      before do
        @expectation = AnyArgumentExpectation.new
      end

      describe "#expected_arguments" do
        it "returns an empty array" do
          expectation.expected_arguments.should == []
        end
      end

      describe "==" do
        it "returns true when comparing with another AnyArgumentExpectation" do
          expectation.should == AnyArgumentExpectation.new
        end

        it "returns false when comparing with ArgumentEqualityExpectation" do
          expectation.should_not == ArgumentEqualityExpectation.new(1)
        end
      end

      describe "#exact_match?" do
        it "returns false" do
          expectation.should_not be_exact_match(1, 2, 3)
          expectation.should_not be_exact_match(1, 2)
          expectation.should_not be_exact_match(1)
          expectation.should_not be_exact_match()
          expectation.should_not be_exact_match("does not match")
        end
      end

      describe "#wildcard_match?" do
        it "returns true" do
          expectation = AnyArgumentExpectation.new
          expectation.should be_wildcard_match(1, 2, 3)
          expectation.should be_wildcard_match("whatever")
          expectation.should be_wildcard_match("whatever", "else")
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rr-0.4.5 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.6 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.3 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.7 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.10 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.8 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.1 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.2 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.0 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.4 spec/rr/expectations/any_argument_expectation_spec.rb
rr-0.4.9 spec/rr/expectations/any_argument_expectation_spec.rb