Sha256: 36e2ccb5fe900d54bf71c9dd96d1df0e4ad5588dc029a605f5673a418a3577bd

Contents?: true

Size: 1.42 KB

Versions: 53

Compression:

Stored size: 1.42 KB

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../../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

53 entries across 49 versions & 9 rubygems

Version Path
adva-0.2.4 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.2.3 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.2.2 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.2.1 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.2.0 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.1.4 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.1.3 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.1.2 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.1.1 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.1.0 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
adva-0.0.1 test/rr/spec/rr/expectations/any_argument_expectation_spec.rb
jferris-rr-0.7.1.0.1239654108 spec/rr/expectations/any_argument_expectation_spec.rb
redinger-redinger-rr-0.10.3 spec/rr/expectations/any_argument_expectation_spec.rb
redinger-rr-0.10.4 spec/rr/expectations/any_argument_expectation_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/expectations/any_argument_expectation_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/expectations/any_argument_expectation_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/expectations/any_argument_expectation_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/expectations/any_argument_expectation_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/expectations/any_argument_expectation_spec.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/expectations/any_argument_expectation_spec.rb