add cucumber for integration testing and add a feature for statistics

refactor some stuff to support testing statistisc
This commit is contained in:
Reinier Balt 2009-04-13 22:26:20 +02:00
parent 058079a0a7
commit 43440eaf33
11 changed files with 286 additions and 5 deletions

View file

@ -0,0 +1,9 @@
Given /^I am logged in$/ do
@current_user = User.create!(:login => "testuser", :password => "secret", :password_confirmation => "secret")
@current_user.create_preference
visit login_path
fill_in "login", :with => "testuser"
fill_in "password", :with => "secret"
click_button "Sign in"
response.body.should =~ /Login successful/m
end