Sha256: 387400d6a69de97f84516dad4897e1a8a908d99d1b67226e3d31af2c18c922c5

Contents?: true

Size: 844 Bytes

Versions: 18

Compression:

Stored size: 844 Bytes

Contents

#!/usr/bin/env ruby

#---
# Copyright 2003, 2004, 2005, 2006, 2007 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.

# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#+++

require 'flexmock/base'

class FlexMock
  
  class RSpecFrameworkAdapter
    def assert_block(msg, &block)
      Spec::Expectations.fail_with(msg) unless yield
    end

    def assert_equal(a, b, msg=nil)
      message = msg || "Expected equal"
      assert_block(message + "\n<#{a}> expected, but was\n<#{b}>") { a == b }
    end

    class AssertionFailedError < StandardError; end
    def assertion_failed_error
      Spec::Expectations::ExpectationNotMetError
    end
  end

  @framework_adapter = RSpecFrameworkAdapter.new

end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
flexmock-0.8.7 lib/flexmock/rspec.rb
flexmock-0.6.4 lib/flexmock/rspec.rb
flexmock-0.8.1 lib/flexmock/rspec.rb
flexmock-0.6.0 lib/flexmock/rspec.rb
flexmock-0.6.3 lib/flexmock/rspec.rb
flexmock-0.7.0 lib/flexmock/rspec.rb
flexmock-0.8.0 lib/flexmock/rspec.rb
flexmock-0.6.1 lib/flexmock/rspec.rb
flexmock-0.6.2 lib/flexmock/rspec.rb
flexmock-0.7.1 lib/flexmock/rspec.rb
flexmock-0.8.2 lib/flexmock/rspec.rb
flexmock-0.8.6 lib/flexmock/rspec.rb
flexmock-0.8.5 lib/flexmock/rspec.rb
flexmock-0.8.3 lib/flexmock/rspec.rb
flexmock-0.8.4 lib/flexmock/rspec.rb
mack-0.8.2 lib/gems/flexmock-0.8.3/lib/flexmock/rspec.rb
mack-0.8.3 lib/gems/flexmock-0.8.3/lib/flexmock/rspec.rb
mack-0.8.3.1 lib/gems/flexmock-0.8.3/lib/flexmock/rspec.rb