test/test_helper.rb in authpds-1.1.4 vs test/test_helper.rb in authpds-1.1.5
- old
+ new
@@ -1,22 +1,21 @@
require 'coveralls'
Coveralls.wear!
require 'rubygems'
require 'authlogic'
require 'authlogic/test_case'
-require "test/unit"
+require 'minitest/autorun'
require "vcr"
require "active_record"
require "active_record/fixtures"
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
-ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
logger = Logger.new(STDOUT)
logger.level= Logger::FATAL
ActiveRecord::Base.logger = logger
-ActiveRecord::Base.configurations = true
+ActiveRecord::Base.establish_connection(adapter: :sqlite3, database: ':memory:')
ActiveRecord::Schema.define(:version => 1) do
drop_table :users if table_exists?(:users)
create_table :users do |t|
t.string "username", :default => "", :null => false
t.string "email"
@@ -29,12 +28,12 @@
t.string "persistence_token", :null => false
t.integer "login_count", :default => 0, :null => false
t.datetime "last_request_at"
t.datetime "current_login_at"
t.datetime "last_login_at"
- t.string "last_login_ip"
- t.string "current_login_ip"
+ t.string "last_login_ip"
+ t.string "current_login_ip"
t.text "user_attributes"
t.datetime "refreshed_at"
t.timestamps
end unless table_exists?(:users)
end
@@ -67,21 +66,21 @@
class Authlogic::TestCase::MockController
def self.helper_method(*args)
end
include Authpds::Controllers::AuthpdsController
-
+
def url_for(options={})
return "http://railsapp.library.nyu.edu/validate?return_url=#{options[:return_url]}"
end
-
+
def root_url
end
def redirect_to(*args)
end
-
+
def validate_url(options={})
return "http://railsapp.library.nyu.edu/validate?return_url=#{options[:return_url]}"
end
def performed?
@@ -89,10 +88,10 @@
end
def request
@request ||= Authlogic::TestCase::MockRequest.new(self)
end
-
+
def env
@env ||= {'REMOTE_ADDR' => "128.122.149.239"}
end
end