Sha256: 349461aa2710afad743cb482e0ba259dd6257dd56da04a34156a521bfd9d9845

Contents?: true

Size: 1.69 KB

Versions: 167

Compression:

Stored size: 1.69 KB

Contents

# Running Tests

In order to complete this exercise, and all of the subsequent exercises, you
will need to pass multiple tests.

## Understanding Test Results

After you have created and saved `hamming.rb`, run the test suite. You should
see output like the following:

    # Running:

    SSSSSSESSSSSSSSS

    Finished in 0.002593s, 6170.4588 runs/s, 0.0000 assertions/s.

      1) Error:
    HammingTest#test_identical_strands:
    NameError: uninitialized constant HammingTest::Hamming
    Did you mean?  HammingTest
        ../hamming/hamming_test.rb:9:in `test_identical_strands'

    16 runs, 0 assertions, 0 failures, 1 errors, 15 skips

    You have skipped tests. Run with --verbose for details.


The letters `SSSSSSESSSSSSSSS` show that there are sixteen tests altogether,
that one of them has an error (`E`), and that the rest of them are skipped (all
the `S` letters).

The tests are run in randomized order, which will cause the letters to display
in random order as well.

The goal is to have all passing tests, which will show in two places:

1. `SSSSSSESSSSSSSSS` will become a series dots: `................`, 

2. The line at the bottom will read `16 runs, 0 assertions, 0 failures, 0
   errors, 0 skips`.

## Passing Tests

Write enough code to change the Error to Failure, and finally to Passing.

Open `hamming_test.rb`, and find the word "skip". All but the first test start
with "skip", which tells Minitest to ignore the test. This is so that you don't
have to deal with all the failures at once.

To activate the next test, delete the "skip", or comment it out, and run the
test suite again.

## Wash, Rinse, Repeat

Delete one "skip" at a time, and make each test pass before you move to the
next one.

Version data entries

167 entries across 167 versions & 1 rubygems

Version Path
trackler-2.2.1.147 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.146 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.145 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.144 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.143 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.142 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.141 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.140 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.139 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.138 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.137 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.136 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.135 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.134 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.133 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.132 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.131 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.130 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.129 tracks/ruby/exercises/hamming/RUNNING_TESTS.md
trackler-2.2.1.128 tracks/ruby/exercises/hamming/RUNNING_TESTS.md