Sha256: e58db268ff20613cccec5722d3dd8c1d3c63fc1afd98f5ca694bde8eb593209d

Contents?: true

Size: 575 Bytes

Versions: 7

Compression:

Stored size: 575 Bytes

Contents

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

describe Object, "#flunk" do
  before :each do
    MSpec.stub!(:actions)
    MSpec.stub!(:current).and_return(mock("spec state", :null_object => true))
  end

  it "raises an ExpectationNotMetError unconditionally" do
    lambda { flunk }.should raise_error(ExpectationNotMetError)
  end

  it "accepts on argument for an optional message" do
    lambda {flunk "test"}.should raise_error(ExpectationNotMetError)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mspec-1.5.10 spec/helpers/flunk_spec.rb
mspec-1.5.4 spec/helpers/flunk_spec.rb
mspec-1.5.7 spec/helpers/flunk_spec.rb
mspec-1.5.5 spec/helpers/flunk_spec.rb
mspec-1.5.6 spec/helpers/flunk_spec.rb
mspec-1.5.9 spec/helpers/flunk_spec.rb
mspec-1.5.8 spec/helpers/flunk_spec.rb