Sha256: a6c1cfea9fe8849b280e40c326384941d8b4bb2000a6a39b56fc7d79b810c33e

Contents?: true

Size: 533 Bytes

Versions: 6

Compression:

Stored size: 533 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__)
require 'alf-sequel'
require 'sinatra/alf-rest'
require 'rspec'
require 'path'
require 'rack/test'

module Helpers

  def mock_app(&bl)
    Class.new(Sinatra::Base){
      register Sinatra::AlfRest
      alf_rest do |cfg|
        cfg.database = Alf.database(Path.backfind('fixtures/sap.db'))
      end
      enable  :raise_errors
      disable :show_exceptions
      instance_eval(&bl)
    }
  end

end

RSpec.configure do |c|
  c.include Helpers
  c.extend  Helpers
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alf-rest-0.17.1 spec/integration/spec_helper.rb
alf-rest-0.16.3 spec/integration/spec_helper.rb
alf-rest-0.16.2 spec/integration/spec_helper.rb
alf-rest-0.16.1 spec/integration/spec_helper.rb
alf-rest-0.16.0 spec/integration/spec_helper.rb
alf-rest-0.14.0 spec/integration/spec_helper.rb