Sha256: aaa5029a7f25d3465c51ffe6593f23a26ca96ee58f3cdfe597b0aa6d25704537

Contents?: true

Size: 695 Bytes

Versions: 5

Compression:

Stored size: 695 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../../example_helper")

describe Micronaut::Matchers do

    describe "wrap_expectation" do
      
      def stub_matcher
        @_stub_matcher ||= simple_matcher do
        end
      end
      
      def failing_matcher
        @_failing_matcher ||= simple_matcher do
          1.should == 2
        end
      end
      
      it "should return true if there is no error" do
        wrap_expectation stub_matcher do
        end.should be_true
      end
      
      it "should return false if there is an error" do
        wrap_expectation failing_matcher do
          raise "error"
        end.should be_false
      end

    end
    
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spicycode-micronaut-0.0.9 examples/lib/micronaut/expectations/wrap_expectation_example.rb
spicycode-micronaut-0.1.0 examples/lib/micronaut/expectations/wrap_expectation_example.rb
spicycode-micronaut-0.1.1 examples/lib/micronaut/expectations/wrap_expectation_example.rb
spicycode-micronaut-0.1.2 examples/lib/micronaut/expectations/wrap_expectation_example.rb
spicycode-micronaut-0.1.3 examples/lib/micronaut/expectations/wrap_expectation_example.rb