Ben Mabey wrote: > > With that step definition you don't need to pollute all of your features > with the steps to login. As it turns out you can have the best of both > worlds. Meaning, if you want webrat to use the faster post method only > for non-selenium runs you can. Like so: > > Given /^I log in as "(.*)"$/ do |login_name| > @user = User.find_by_login(login_name) > webrat.atutomate do > vist "/session" > fill_in "login", :with => login_name > fill_in "password", :with => 'secret' > click_button "entrar" > end > > webrat.simulate do > post "/session", :login => @user.login, :password => 'secret' > end > end >
Excellent (and elegant), it works now! Thank you for your help along the way, Balint -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users