Sha256: 9b9b08b5589e9641f4802ccbaf6ec1377807659a09b0f060d19fc6df4c819082

Contents?: true

Size: 847 Bytes

Versions: 3

Compression:

Stored size: 847 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

ENV['RACK_ENV'] = 'test'
ENV['SESSION_SECRET'] = 'secret'

require 'deep_thought'
require 'rubygems'
require 'fileutils'
gem 'minitest'
require 'minitest/autorun'
require 'rack/test'
require 'mocha/setup'
require 'capybara'
require 'database_cleaner'

begin; require 'turn/autorun'; rescue LoadError; end

DeepThought.setup(ENV)

Capybara.app = DeepThought::App

DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :transaction

BCrypt::Engine.cost = BCrypt::Engine::MIN_COST

Delayed::Worker.delay_jobs = false

def login(email, password)
  visit '/login'
  within(".content > form") do
    fill_in 'email', :with => email
    fill_in 'password', :with => password
    click_button 'login'
  end
end

def logout
  within(".logout") do
    click_button "logout"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deep_thought-0.2.1 test/test_helper.rb
deep_thought-0.1.1 test/test_helper.rb
deep_thought-0.1.0 test/test_helper.rb