Thanks for the responses!
So to me it seems like Ruby/Rails controllers know about the model;
since Rails "stitches" the view, controllers and model together for you
I guess that makes sense.
A similar thing that is throwing me for a loop is something like this.
test "should get index" do
get :index
assert_response :success
assert_select '#columns #side a' , :minimum => 4
assert_select '#main .entry' , 3
assert_select 'h3' , 'Programming Ruby 1.9'
assert_select '.price' , /\$[,\d]+\.\d\d/
end
This is a unit test from the book. The assert_select(s) test the html
response. But, this really confuses me because I see now response
anywhere?
How in the world do the assert statements know of the HTML that was
generated?
--
Posted via http://www.ruby-forum.com/.
--
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.