[#4177] Added a project module for contracts and a stubbed permission.

This commit is contained in:
Eric Davis
2010-06-17 14:34:15 -07:00
parent 4ce7595111
commit 7892c577c8
4 changed files with 67 additions and 0 deletions
+16
View File
@@ -9,3 +9,19 @@ require "webrat"
Webrat.configure do |config|
config.mode = :rails
end
module IntegrationTestHelper
def login_as(user="existing", password="existing")
visit "/login"
fill_in 'Login', :with => user
fill_in 'Password', :with => password
click_button 'login'
assert_response :success
assert User.current.logged?
end
end
class ActionController::IntegrationTest
include IntegrationTestHelper
end