blob: 7b1216d3f7ff2076c6f78e18d21beb04842b0d95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require 'spec_helper'
require 'mspec/expectations/expectations'
require 'mspec/runner/mspec'
require 'mspec/guards'
require 'mspec/helpers'
describe Object, "#flunk" do
before :each do
MSpec.stub(:actions)
MSpec.stub(:current).and_return(double("spec state").as_null_object)
end
it "raises an SpecExpectationNotMetError unconditionally" do
lambda { flunk }.should raise_error(SpecExpectationNotMetError)
end
it "accepts on argument for an optional message" do
lambda {flunk "test"}.should raise_error(SpecExpectationNotMetError)
end
end
|