]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/spec/spec/example/pending_module_spec.rb
c3ab0126b5d346d657c6ab39de75ae520db3bddf
[rails.git] / vendor / gems / rspec-1.1.2 / spec / spec / example / pending_module_spec.rb
1 module Spec
2   module Example
3     describe Pending do
4       
5       it 'should raise an ExamplePendingError if no block is supplied' do
6         lambda {
7           include Pending
8           pending "TODO"
9         }.should raise_error(ExamplePendingError, /TODO/)
10       end
11       
12       it 'should raise an ExamplePendingError if a supplied block fails as expected' do
13         lambda {
14           include Pending
15           pending "TODO" do
16             raise "oops"
17           end
18         }.should raise_error(ExamplePendingError, /TODO/)
19       end
20       
21       it 'should raise a PendingExampleFixedError if a supplied block starts working' do
22         lambda {
23           include Pending
24           pending "TODO" do
25             # success!
26           end
27         }.should raise_error(PendingExampleFixedError, /TODO/)
28       end
29     end
30   end
31 end