Sha256: aef6deb6cc8dedf87375813e2e86efbe05114ab72912ed396d620c93e4575aed

Contents?: true

Size: 1.43 KB

Versions: 23

Compression:

Stored size: 1.43 KB

Contents

require "examples/example_helper"

module RR
module Expectations
  describe ArgumentEqualityExpectation, "expected_arguments" do
    before do
      @expectation = AnyArgumentExpectation.new
    end

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

  describe AnyArgumentExpectation, "==" do
    before do
      @expectation = AnyArgumentExpectation.new
    end

    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 AnyArgumentExpectation, "#exact_match?" do
    before do
      @expectation = AnyArgumentExpectation.new
    end

    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 AnyArgumentExpectation, "#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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rr-0.1.11 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.1.14 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.1.13 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.1.15 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.1.10 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.1.12 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.0 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.2.3 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.2 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.1 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.3 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.4 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.10 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.2.2 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.2.1 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.2.4 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.11 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.2.5 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.5 examples/rr/expectations/any_argument_expectation_example.rb
rr-0.3.9 examples/rr/expectations/any_argument_expectation_example.rb