File: test_testunit.rb

package info (click to toggle)
ruby-test-spec 0.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 280 kB
  • sloc: ruby: 1,851; makefile: 9
file content (22 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'test/spec'

class TestTestUnit < Test::Unit::TestCase
  def test_still_works_on_its_own
    assert_equal 1, 1
    assert_raise(RuntimeError) { raise "Error" }
  end

  def test_supports_should_good_enough
    (2 + 3).should.be 5
    lambda { raise "Error" }.should.raise
    assert true
  end
end

context "TestUnit" do
  specify "works inside test/spec" do
    assert_equal 1, 1
    assert_raise(RuntimeError) { raise "Error" }
  end
end