Sha256: c347ac1cb0fda78a1509f5803e8876c6fb56913fe805b745609b833c331b18ae

Contents?: true

Size: 892 Bytes

Versions: 14

Compression:

Stored size: 892 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'mspec/expectations/expectations'

describe ExpectationNotMetError do
  it "is a subclass of StandardError" do
    ExpectationNotMetError.ancestors.should include(StandardError)
  end
end

describe ExpectationNotFoundError do
  it "is a subclass of StandardError" do
    ExpectationNotFoundError.ancestors.should include(StandardError)
  end
end

describe ExpectationNotFoundError, "#message" do
  it "returns 'No behavior expectation was found in the example'" do
    m = ExpectationNotFoundError.new.message
    m.should == "No behavior expectation was found in the example"
  end
end

describe Expectation, "#fail_with" do
  it "raises an ExpectationNotMetError" do
    lambda {
      Expectation.fail_with "expected this", "to equal that"
    }.should raise_error(ExpectationNotMetError, "expected this to equal that")
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mspec-1.4.0 spec/expectations/expectations_spec.rb
mspec-1.5.2 spec/expectations/expectations_spec.rb
mspec-1.3.1 spec/expectations/expectations_spec.rb
mspec-1.5.0 spec/expectations/expectations_spec.rb
mspec-1.5.1 spec/expectations/expectations_spec.rb
mspec-1.5.10 spec/expectations/expectations_spec.rb
mspec-1.5.4 spec/expectations/expectations_spec.rb
mspec-1.5.3 spec/expectations/expectations_spec.rb
mspec-1.3.0 spec/expectations/expectations_spec.rb
mspec-1.5.9 spec/expectations/expectations_spec.rb
mspec-1.5.8 spec/expectations/expectations_spec.rb
mspec-1.5.7 spec/expectations/expectations_spec.rb
mspec-1.5.5 spec/expectations/expectations_spec.rb
mspec-1.5.6 spec/expectations/expectations_spec.rb