Sha256: b056607dd1d3976bac021d74988bc85fffe98004929ebe1a95e2f721791283d4

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

$: << File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
require 'rack/test'
require 'minitest/autorun'
require 'minitest/spec'
require 'capybara'
require 'capybara/dsl'
require 'capybara/webkit'
require 'capybara/poltergeist'
require 'mail'
require 'goatmail'
if /^ruby/ =~ RUBY_DESCRIPTION && RUBY_VERSION >= '2.0'
  require 'minitest-power_assert'
end
if ENV['TRAVIS']
  require 'coveralls'
  Coveralls.wear!
end

class MiniTest::Spec
  include Rack::Test::Methods
  include Capybara::DSL
  def app
    Goatmail::App
  end
end
class Minitest::SharedExamples < Module
  include Minitest::Spec::DSL
end

def tmp_dir
  @tmp_dir ||= File.expand_path('tmp', File.dirname(__FILE__))
end
def test_location
  @test_locatino ||= File.join(tmp_dir, 'goatmail')
end

Goatmail.location = test_location
Mail.defaults do
  delivery_method Goatmail::DeliveryMethod
end

MiniTest::Spec.after do
  FileUtils.rm_rf tmp_dir
end

Capybara.app = Goatmail::App
Capybara.default_driver = :webkit
Capybara.javascript_driver = :poltergeist

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
goatmail-1.2.0 test/helper.rb
goatmail-1.1.1 test/helper.rb
goatmail-1.1.0 test/helper.rb
goatmail-1.0.0 test/helper.rb