Hi everyone!
I'm using Steak 1.1.0 for acceptance testing with Capybara 0.4.1.2, RSpec 2.5.0 and Rails 3.0.4, and I've tried to run a test like the one below, but unfortunately the message displayed doesn't seem to appear in the DOM.
scenario "should not be able to create a group without a name" do
visit("/groups/new")
click_on "Save"
page.should have_content("Please fillout this field.")
end
I've tried to understand how those error notifications are implemented and it looks like is using the content_tag method to attach the error to the DOM. Does anyone have any advice on how to test this?
Is simple_form designed to show the error notifications without generating a new HTTP request to the 'create' action, and being redirected back to the 'new' one when there are errors on the object?
Any hint would be appreciate it. Thanks.