Sha256: a832f296bdbe5dfddea4668bee20c0ff29095111a107b6a16d5915e2379d9c13

Contents?: true

Size: 1.74 KB

Versions: 17

Compression:

Stored size: 1.74 KB

Contents

require "examples/example_helper"

module RR
module Extensions
  describe InstanceMethods, "#anything" do
    it_should_behave_like "RR::Extensions::InstanceMethods"
    
    it "returns an Anything matcher" do
      anything.should == WildcardMatchers::Anything.new
    end

    it "rr_anything returns an Anything matcher" do
      rr_anything.should == WildcardMatchers::Anything.new
    end
  end

  describe InstanceMethods, "#is_a" do
    it_should_behave_like "RR::Extensions::InstanceMethods"

    it "returns an IsA matcher" do
      is_a(Integer).should == WildcardMatchers::IsA.new(Integer)
    end

    it "rr_is_a returns an IsA matcher" do
      rr_is_a(Integer).should == WildcardMatchers::IsA.new(Integer)
    end
  end

  describe InstanceMethods, "#numeric" do
    it_should_behave_like "RR::Extensions::InstanceMethods"

    it "returns an Numeric matcher" do
      numeric.should == WildcardMatchers::Numeric.new
    end

    it "rr_numeric returns an Numeric matcher" do
      rr_numeric.should == WildcardMatchers::Numeric.new
    end
  end

  describe InstanceMethods, "#boolean" do
    it_should_behave_like "RR::Extensions::InstanceMethods"

    it "returns an Boolean matcher" do
      boolean.should == WildcardMatchers::Boolean.new
    end

    it "rr_boolean returns an Boolean matcher" do
      rr_boolean.should == WildcardMatchers::Boolean.new
    end
  end

  describe InstanceMethods, "#duck_type" do
    it_should_behave_like "RR::Extensions::InstanceMethods"

    it "returns a DuckType matcher" do
      duck_type(:one, :two).should == WildcardMatchers::DuckType.new(:one, :two)
    end

    it "rr_duck_type returns a DuckType matcher" do
      rr_duck_type(:one, :two).should == WildcardMatchers::DuckType.new(:one, :two)
    end
  end
end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rr-0.3.1 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.11 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.2.4 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.2.2 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.2 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.3 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.4 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.0 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.2.3 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.2.5 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.2.1 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.10 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.6 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.7 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.8 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.9 examples/rr/extensions/instance_methods_argument_matcher_example.rb
rr-0.3.5 examples/rr/extensions/instance_methods_argument_matcher_example.rb