Hi,Man
I write some integration test,like follow
------------------------------------------------
[code]
require "#{File.dirname(__FILE__)}/../test_helper"
class BrowsingAndSearchingTest < ActionController::IntegrationTest
fixtures :publishers, :authors, :books, :authors_books
def test_browsing_the_site
jill = enter_site(:jill)
jill.browse_index
end
private
module BrowsingTestDSL
attr_writer :name
def browse_index
get "/catalog"
assert_response :success
assert_template "catalog/index"
assert_tag :tag => "dl", :attributes =>
{ :id => "books"},
:children =>
{ :count => 10, :only =>
{:tag => "dt"}}
assert_tag :tag => "dt", :content => "The Idiot"
end
end
def enter_site(name)
open_session do |session|
session.extend(BrowsingTestDSL)
session.name = name
yield seesion if block_given?
end
end
end
[/code]
------------------------------------------
but when i run the integration test,it go wrong,the wrong information
was
[quote]
Expect response to be a <:success>,but was <500>
[/quote]
Am I missing something ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---