changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1module 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
31end