Acceptance testing of sinatra app using webrat fails
问题 I am trying to test a ruby authentication app using minitest and webrat but get errors. Tests like visit '/' fail with an error Status 200 expected but was 404. Tests containing code like fill_in :email, :with => "first@company.com" fail with error Could not find field: :email . I read several sinatra, testing and webrat documents and forums. Some of them were old and suggested stuff like Sinatra::Default, but github.com/brynary/webrat/wiki/sinatra, Building a Sinatra App Driven By Webrat