Created
November 2, 2011 16:12
-
-
Save ralph/1334056 to your computer and use it in GitHub Desktop.
Ruby 1.9.3 sample test case to try out the parallel test runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run options: | |
# Running tests: | |
.. | |
Finished tests in 0.000774s, 2583.9793 tests/s, 2583.9793 assertions/s. | |
2 tests, 2 assertions, 0 failures, 0 errors, 0 skips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run options: -j 2 | |
# Running tests: | |
Retrying... | |
Finished tests in 0.106191s, 0.0000 tests/s, 0.0000 assertions/s. | |
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run options: -j 2 --no-retry | |
# Running tests: | |
/Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:522:in `+': nil can't be coerced into Fixnum (TypeError) | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:522:in `_run_parallel' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:561:in `_run_suites' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:746:in `_run_anything' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:909:in `run_tests' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:896:in `block in _run' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:895:in `each' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:895:in `_run' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:884:in `run' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:27:in `run_once' | |
from /Users/ralph/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test/unit' | |
class TestTest < Test::Unit::TestCase | |
def test_brogrammer | |
brogrammer_confirmed = true | |
assert brogrammer_confirmed | |
end | |
def test_schnitzel | |
schnitzel = 'schnitzel' | |
assert_equal 'schnitzel', schnitzel | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment