Forum: Ruby on Rails problems developing a test

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Clem R. (Guest)
on 2006-12-24 22:06

    I'm pretty new to ruby and I'm trying to develop a test for a simple

The method is this:

def show_details
      @accounts = Account.find( params[:id] )

and the test method I'm trying is this:

def test_show_details
    get :index, :context => 'admin', :id => 1
    assert_response :success
    assert_equal assigns(:accounts), accounts(:blake_acount)

we have some test data in .yml file called accounts.yml which is stored
in /test/fixtures/ directory and it contains this section on

  id: 1
  user_id: 1
  first_name: Blake
  expire_on: <%= + 32 %>
  recurring: false
  country_code: US

Don't understand why this fails?
This topic is locked and can not be replied to.