Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: d8197524f4
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (31 sloc) 0.964 kB
require 'pp'
require 'rubygems'
require 'bundler'
project_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
Bundler.setup(:runtime, :test)
require File.expand_path(File.join('..', '..', 'lib', 'hancock'), __FILE__)
Bundler.require(:test)
require File.join(project_root, 'spec', 'helpers', 'app')
require File.join(project_root, 'spec', 'helpers', 'matchers')
Webrat.configure do |config|
config.mode = :rack
config.application_framework = :sinatra
config.application_port = 4567
end
class MyUserClass
def self.authenticated?(username, password)
username == 'atmos' && password == 'hancock'
end
end
Spec::Runner.configure do |config|
def app
Hancock::TestApp.app
end
def login(username, password)
post '/sso/login', :username => username, :password => password
end
config.include(Rack::Test::Methods)
config.include(Webrat::Methods)
config.include(Webrat::Matchers)
config.include(Hancock::Matchers)
end
Jump to Line
Something went wrong with that request. Please try again.