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.8.1 test/assert_raise.rb
cutest-cj-1.8.0 test/assert_raise.rb
cutest-cj-1.7.1 test/assert_raise.rb
cutest-cj-1.7.0 test/assert_raise.rb
cutest-cj-1.6.4 test/assert_raise.rb
cutest-cj-1.6.3 test/assert_raise.rb
cutest-cj-1.6.2 test/assert_raise.rb
cutest-cj-1.6.1 test/assert_raise.rb
cutest-cj-1.6.0 test/assert_raise.rb
cutest-cj-1.5.1 test/assert_raise.rb
cutest-cj-1.5.0 test/assert_raise.rb
cutest-cj-1.4.0 test/assert_raise.rb
cutest-cj-1.3.9 test/assert_raise.rb
cutest-cj-1.3.8 test/assert_raise.rb
cutest-cj-1.3.7 test/assert_raise.rb
cutest-cj-1.3.6 test/assert_raise.rb
cutest-cj-1.3.5 test/assert_raise.rb
cutest-cj-1.3.4 test/assert_raise.rb
cutest-cj-1.3.3 test/assert_raise.rb
cutest-cj-1.3.2 test/assert_raise.rb