~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to vendor/gems/rspec/failing_examples/mocking_with_rr.rb

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mfrom: (1.1.8 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080726154345-c03m49twzxewdwjn
Tags: 0.24.5-2
* Fix puppetlast to work with 0.24.5
* Adjust logcheck to match against new log messages in 0.24.5
* Update standards version to 3.8.0 (no changes)
* Update changelog to reduce length of line to make lintian happy

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# stub frameworks like to gum up Object, so this is deliberately
 
2
# set NOT to run so that you don't accidentally run it when you
 
3
# run this dir.
 
4
 
 
5
# To run it, stand in this directory and say:
 
6
#
 
7
#   RUN_RR_EXAMPLE=true ruby ../bin/spec mocking_with_rr.rb
 
8
 
 
9
if ENV['RUN_RR_EXAMPLE']
 
10
  Spec::Runner.configure do |config|
 
11
    config.mock_with :rr
 
12
  end
 
13
  describe "RR framework" do
 
14
    it "should should be made available by saying config.mock_with :rr" do
 
15
      o = Object.new
 
16
      mock(o).msg("arg")
 
17
      o.msg
 
18
    end
 
19
    it "should should be made available by saying config.mock_with :rr" do
 
20
      o = Object.new
 
21
      mock(o) do |m|
 
22
        m.msg("arg")
 
23
      end
 
24
      o.msg
 
25
    end
 
26
  end
 
27
end