assert_no_rjs_ now negates all the JavaScript assertions listed here:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/49fd7c9b9107d577
And assert_rjs_ now works in RSpec:
it 'should use Ajax to replace person 45' do
xhr :get, :replace_person, :id => 45
@response.body.should send_js_to(:replace_html, 'person_45') do
strong 'person_45'
end
end
Once again, the do-end block calls Nokogiri::HTML::Builder to build a sample of
HTML. The assertion then matches this to the HTML delivered in the payload of
the JS Element.update() call.
The committee is unaware of any other RJS solution for RSpec...
(Sorry - no .should not_send_js_to yet..;)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---