File: default_framework_adapter_test.rb

package info (click to toggle)
ruby-flexmock 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 840 kB
  • sloc: ruby: 7,598; makefile: 6
file content (28 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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 "test_helper"

class TestFlexmockDefaultFrameworkAdapter < Minitest::Test
  def setup
    @adapter = FlexMock::DefaultFrameworkAdapter.new
  end

  def test_assert_block_raises_exception
    assert_raises(FlexMock::DefaultFrameworkAdapter::AssertionFailedError) {
      @adapter.check("failure message") { false }
    }
  end

  def test_make_assertion_doesnt_raise_exception_when_making_assertion
    @adapter.check("failure message") { true }
  end
end