Sha256: f0e9705cc2480a7a6f8fd40a52bfc8204d15bb3c2fa9da5fabeb055e6a9f75e5

Contents?: true

Size: 571 Bytes

Versions: 43

Compression:

Stored size: 571 Bytes

Contents

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

describe Micronaut::Matchers, '#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

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
spicycode-micronaut-0.3.0 examples/lib/micronaut/expectations/wrap_expectation_example.rb
micronaut-0.3.0 examples/lib/micronaut/expectations/wrap_expectation_example.rb
micronaut-0.2.9 examples/lib/micronaut/expectations/wrap_expectation_example.rb