~ubuntu-branches/ubuntu/oneiric/rake/oneiric

« back to all changes in this revision

Viewing changes to flexmock-0.6.0/lib/flexmock/rspec.rb

  • Committer: Bazaar Package Importer
  • Author(s): Adam Majer
  • Date: 2007-05-06 17:15:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070506171536-qy40vbx5a248gsak
Tags: 0.7.3-1
* New upstream release
* Updated flexmock from 0.1.7 to 0.6.0
* Updated Standards to 0.7.2 - no changes
* Fixed Build-Depends on debhelper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env ruby
 
2
 
 
3
#---
 
4
# Copyright 2003, 2004, 2005, 2006, 2007 by Jim Weirich (jim@weirichhouse.org).
 
5
# All rights reserved.
 
6
 
 
7
# Permission is granted for use, copying, modification, distribution,
 
8
# and distribution of modified versions of this work as long as the
 
9
# above copyright notice is included.
 
10
#+++
 
11
 
 
12
require 'flexmock/base'
 
13
 
 
14
class FlexMock
 
15
  
 
16
  class RSpecFrameworkAdapter
 
17
    def assert_block(msg, &block)
 
18
      Spec::Expectations.fail_with(msg) unless yield
 
19
    end
 
20
 
 
21
    def assert_equal(a, b, msg=nil)
 
22
      message = msg || "Expected equal"
 
23
      assert_block(message + "\n<#{a}> expected, but was\n<#{b}>") { a == b }
 
24
    end
 
25
 
 
26
    class AssertionFailedError < StandardError; end
 
27
    def assertion_failed_error
 
28
      Spec::Expectations::ExpectationNotMetError
 
29
    end
 
30
  end
 
31
 
 
32
  @framework_adapter = RSpecFrameworkAdapter.new
 
33
 
 
34
end
 
 
b'\\ No newline at end of file'