Skip to content

Commit

Permalink
changing generators to require "test_helper" instead of the old File.…
Browse files Browse the repository at this point in the history
…join. the old way was problematic when we used RR.
  • Loading branch information
Dan Croak committed Feb 16, 2009
1 parent 6954964 commit 4e276c6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Rakefile
@@ -1,12 +1,13 @@
require 'rake'
require 'rake/testtask'
require 'cucumber/rake/task'

test_files_pattern = 'test/rails_root/test/{unit,functional,other}/**/*_test.rb'

namespace :test do
Rake::TestTask.new(:all => ['generator:cleanup', 'generator:generate']) do |task|
task.libs << 'lib'
task.libs << File.join(File.dirname(__FILE__), "test/rails_root/test")
task.pattern = test_files_pattern
task.verbose = false
end
Expand Down
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class ConfirmationsControllerTest < ActionController::TestCase
include Clearance::Test::Functional::ConfirmationsControllerTest
Expand Down
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class PasswordsControllerTest < ActionController::TestCase
include Clearance::Test::Functional::PasswordsControllerTest
Expand Down
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class SessionsControllerTest < ActionController::TestCase
include Clearance::Test::Functional::SessionsControllerTest
Expand Down
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class UsersControllerTest < ActionController::TestCase
include Clearance::Test::Functional::UsersControllerTest
Expand Down
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class ClearanceMailerTest < ActionMailer::TestCase
tests ClearanceMailer
Expand Down
2 changes: 1 addition & 1 deletion generators/clearance/templates/test/unit/user_test.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
require 'test_helper'

class UserTest < Test::Unit::TestCase
include Clearance::Test::Unit::UserTest
Expand Down
2 changes: 1 addition & 1 deletion lib/clearance/app/controllers/sessions_controller.rb
Expand Up @@ -18,7 +18,7 @@ def create
@user = User.authenticate(params[:session][:email],
params[:session][:password])
if @user.nil?
flash.now[:notice] = "Bad email or password. Tip: email is case-sensitive."
flash.now[:notice] = "Bad email or password."
render :action => :new
else
if @user.email_confirmed?
Expand Down

0 comments on commit 4e276c6

Please sign in to comment.