Sha256: b9854ce1d85726d08cdfd0140857572a337331897817dda86f4630abdac1851d

Contents?: true

Size: 726 Bytes

Versions: 3

Compression:

Stored size: 726 Bytes

Contents

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')

require 'bundler/setup'
require 'active_record'
require 'cachai'
require 'rack/test'

ActiveRecord::Base.establish_connection(
  "adapter"  => "sqlite3",
  "database" => ':memory:'
)

ActiveRecord::Base.logger = Logger.new(STDOUT)

# this is done automatically by cachai
# load File.join(File.dirname(__FILE__), '/../db/schema.rb')

class TestApp < Sinatra::Base
  use Cachai::Middleware, {
    :domain    => 'domain.com',
    :recipient => 'test@example.com',
    :duration  => 30,
    :sendgrid  => {
      :api_key  => 'test',
      :api_user => 'test'
    }
  }

  get '/' do
    'Hello world'
  end
end


RSpec.configure do |config|
  config.color = true
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cachai-0.2.6 spec/spec_helper.rb
cachai-0.2.5 spec/spec_helper.rb
cachai-0.2.4 spec/spec_helper.rb