Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Test suite is using assert many times when should be used assert_equal

#4611

Apart from the fact that this doesn't test anything but the object in question is not nil, break the tests on 1.9.2.

Reported by Santiago Pastorino · May 16th, 2010 @ 05:33 AM

State: committed
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Santiago Pastorino
    Santiago Pastorino
    • Tag changed from bugmash, testing to bugmash, bugmash-review, patch, testing

    May 16th, 2010 @ 05:37 AM

  2. Santiago Pastorino
  3. Rizwan Reza
    Rizwan Reza
    • Tag changed from bugmash, bugmash-review, patch, testing to bugmash, patch, testing

    Can someone test and report back before we hand it over to core for review?

    May 16th, 2010 @ 09:31 AM

  4. PacoGuzman
    PacoGuzman

    +1

    Patch applies clean in rails edge. All test pass.

    Maybe should be usefull use in all the test the same expression with the '!' character, so:

    assert ! content_for?(:title)

    Would write like:

    assert !content_for?(:title)

    For all the test suite, or maybe this is useless, what do you think?

    May 16th, 2010 @ 12:35 PM

  5. Bastes
    Bastes

    +1

    Applies to rails edge, all test pass.

    Does not apply to 2-3-stable though :

    error: patch failed: activesupport/test/caching_test.rb:375

    error: activesupport/test/caching_test.rb: patch does not apply

    May 16th, 2010 @ 01:59 PM

  6. Rohit Arondekar
    Rohit Arondekar

    +1 Applies to rails edge and the tests pass. Just one thing though, a few of those (the ones from action pack) are repeating the ones I cleared in http://github.com/rails/rails/commit/fc2480a277fd4753aebf68dcf8787d...

    May 16th, 2010 @ 02:25 PM

  7. Santiago Pastorino
    Santiago Pastorino

    Some of the things i did were applied on others tickets, so i deleted the repeated ones.

    May 16th, 2010 @ 02:39 PM

  8. Bastes
    Bastes

    Looks like it's already been applied (no changes when I patch on both master and 2-3-stable).

    May 16th, 2010 @ 03:08 PM

  9. Repository
    Repository
    • State changed from open to committed

    (from [fdfebb7782a399839ac9a9e63d5153565d6f88f4]) Make use of assert_equal to test equallity between object assert expects and object and a message of error

    [#4611 Test suite is using assert many times when should be used assert_equal state:committed]

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/fdfebb7782a399839ac9a9e63d5153...

    May 16th, 2010 @ 03:16 PM

  10. Rizwan Reza
    Rizwan Reza
    • Tag changed from bugmash, patch, testing to patch, testing

    May 16th, 2010 @ 03:57 PM

  11. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM