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.

assert should be replaced with assert_equal in a particular test case

#4636

Here is a test case from ActiveResource.

  def test_to_json
    Person.include_root_in_json = true
    Person.format = :json
    joe = Person.find(6)
    encode = joe.encode
    json = joe.to_json
    Person.format = :xml

    assert encode, json
    assert_match %r{^\{"person":\{"person":\{}, json
    assert_match %r{"id":6}, json
    assert_match %r{"name":"Joe"}, json
    assert_match %r{\}\}\}$}, json
  end

In the above test case 'assert' should be replaced by 'assert_equal'.

Patch will be attached through comment.

Reported by Neeraj Singh · May 18th, 2010 @ 03:54 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Neeraj Singh
    Neeraj Singh
    • Tag changed from activeresource, rails3 to activeresource, patch, rails3

    Attached is a patch against rails edge.

    May 18th, 2010 @ 03:56 AM

  2. Repository
    Repository
    • State changed from new to resolved

    May 18th, 2010 @ 03:13 PM