Sha256: 793cfdf22face06f36823e7df4d0883858355b466f0c0a053f742dd2794efe6f

Contents?: true

Size: 721 Bytes

Versions: 24

Compression:

Stored size: 721 Bytes

Contents

#!/usr/bin/env ruby

#---
# Copyright 2003-2013 by Jim Weirich (jim.weirich@gmail.com).
# 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/noop'

class FlexMock
  class DefaultFrameworkAdapter
    def make_assertion(msg, &block)
      unless yield
        msg = msg.call if msg.is_a?(Proc)
        fail assertion_failed_error, msg
      end
    end

    def check(msg, &block)
      make_assertion(msg, &block)
    end

    class AssertionFailedError < StandardError; end
    def assertion_failed_error
      AssertionFailedError
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
flexmock-2.4.2 lib/flexmock/default_framework_adapter.rb
flexmock-3.0.1 lib/flexmock/default_framework_adapter.rb
flexmock-2.4.1 lib/flexmock/default_framework_adapter.rb
flexmock-3.0.0 lib/flexmock/default_framework_adapter.rb
flexmock-2.4.0 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.8 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.6 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.5 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.4 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.3 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.2 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.1 lib/flexmock/default_framework_adapter.rb
flexmock-2.3.0 lib/flexmock/default_framework_adapter.rb
flexmock-2.2.1 lib/flexmock/default_framework_adapter.rb
flexmock-2.2.0 lib/flexmock/default_framework_adapter.rb
flexmock-2.1.0 lib/flexmock/default_framework_adapter.rb
flexmock-2.0.6 lib/flexmock/default_framework_adapter.rb
flexmock-2.0.5 lib/flexmock/default_framework_adapter.rb
flexmock-2.0.4 lib/flexmock/default_framework_adapter.rb
flexmock-2.0.3 lib/flexmock/default_framework_adapter.rb