Sha256: 13003daa594352e71c1a4b6a328fc279af0ccdeb1a5fb1b81afcb064b7abe618

Contents?: true

Size: 903 Bytes

Versions: 9

Compression:

Stored size: 903 Bytes

Contents

require 'spec_helper'
require 'mspec/expectations/expectations'

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

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

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mspec-1.9.1 spec/expectations/expectations_spec.rb
mspec-1.9.0 spec/expectations/expectations_spec.rb
mspec-1.8.0 spec/expectations/expectations_spec.rb
mspec-1.7.0 spec/expectations/expectations_spec.rb
mspec-1.6.0 spec/expectations/expectations_spec.rb
mspec-1.5.21 spec/expectations/expectations_spec.rb
mspec-1.5.20 spec/expectations/expectations_spec.rb
mspec-1.5.19 spec/expectations/expectations_spec.rb
mspec-1.5.18 spec/expectations/expectations_spec.rb