Help! w/ these simple tests!

C

Clem Rock

Ok - yes - I'm a desperate newbie and I am not sure why these test don't
pass.

Here's the rundown:

#### the method ###############
def show_space
@space = Space.find:)all, :conditions => ["id=?", params[:id]])
end

#### the test #################
def test_show_space
get :show_space, :id => 1
assert_response :success
assert_template 'show_space'
assert_not_nil assigns:)space)
assert_equal assigns:)space), spaces:)first_space)
end

#### and the YAML file: spaces.yml ###############
first_space:
id: 1
title: My first space
subdomain: first-space
domain: functionalalcoholism.org
home_page_id: 57
user_id: 1
owner_id: 1
created_at: 2005-05-21 00:00:00
updated_at: 2005-05-21 00:00:00
wikiwords_enabled: 1
country_code: US
timezone_identifier: US/Eastern
####################################################

#### the method ####################################
def show
@accounts = Account.find :)all, :include => {'owned_spaces' =>
:memberships}, :conditions => ["accounts.id=?", params[:id]])
end

#### the test ######################################
def test_show
get :show,:id => 1
assert_response :success
assert_template 'show'
assert_equal assigns:)account), accounts:)blake_account)
end

#### and the YAML file: accounts.yml ###############
blake_account:
id: 1
user_id: 1
first_name: Blake
street: none
expire_on: <%= Date.today + 32 %>
recurring: false
country_code: US
 
E

Eric Hodel

Ok - yes - I'm a desperate newbie and I am not sure why these test
don't
pass.

These all look like Rails functional tests, so I think you want the
Rails mailing list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top