Sha256: 9bdc4ac5136b714b90abc13d85d07ada9df586b3dfa5d8e835779dd05644ee6b

Contents?: true

Size: 272 Bytes

Versions: 40

Compression:

Stored size: 272 Bytes

Contents

test "catches the right exception" do
  assert_raise(RuntimeError) do
    raise RuntimeError
  end
end

test "raises if the expectation is not met" do
  assert_raise(Cutest::AssertionFailed) do
    assert_raise(RuntimeError) do
      raise ArgumentError
    end
  end
end

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
cutest-cj-1.3.1 test/assert_raise.rb
cutest-cj-1.3.0 test/assert_raise.rb
cutest-cj-1.2.4 test/assert_raise.rb
cutest-cj-1.2.3 test/assert_raise.rb
cutest-cj-1.2.2 test/assert_raise.rb
cutest-1.2.1 test/assert_raise.rb
cutest-1.2.0 test/assert_raise.rb
cutest-1.2.0.rc3 test/assert_raise.rb
cutest-1.2.0.rc2 test/assert_raise.rb
cutest-1.2.0.rc1 test/assert_raise.rb
cutest-1.1.3 test/assert_raise.rb
cutest-1.1.2 test/assert_raise.rb
cutest-1.1.1 test/assert_raise.rb
cutest-1.1.0 test/assert_raise.rb
cutest-1.1.0.rc2 test/assert_raise.rb
cutest-1.1.0.rc1 test/assert_raise.rb
cutest-1.0.1 test/assert_raise.rb
cutest-1.0.0 test/assert_raise.rb
cutest-1.0.0.beta1 test/assert_raise.rb
cutest-1.0.0.beta test/assert_raise.rb