Ad
  • Custom User Avatar

    I am translating a Kata into Ruby, and need to disable the use of certain operators. What is the best way to go about this?

  • Custom User Avatar

    Found the issue. I had an extra space. The test output was condensing the white space, so 2 spaces appeared to be 1.
    I diagnosed the issue by running my code in the terminal with a "puts" statement.
    After correcting the white space, my code passed all tests.

  • Custom User Avatar

    Tests are too dependent on white space being correct.
    It is difficult to diagnose a white space issue because the test output apparently removes extra white space.

    Here is an example:

    #Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ; (test output: expected value)
    #Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ; (test output: actual value)
    #Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B  ; (actual value, when code run in terminal)
    

    In the above example, my code had an additional space before the semicolon, but the test output makes the actual and expected values appear identical.

  • Custom User Avatar

    My tests are failing even though the strings appear to match. I have even compared the string using the tool at http://www.textdiff.com/, and the strings show that they match.

    Here is the failure message:

    Expected: "Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ;", instead got: "Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ;"
    

    Here's the output again, lined up for easy comparison:

    Expected: "Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ;"
    Actual:   "Buy: 169850 Sell: 116000; Badly formed 1: CSCO 250.0 29 B ;"
    

    What am I missing?