Sha256: 090848289455367030eedc6a034ddac450e6f5bfcb3aff1e44f5e1d72bc48ef7

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

ENV['RACK_ENV'] = 'test'

require 'rack/test'
require 'fake_dropbox'
require 'tmpdir'
require 'fileutils'

module TestHelpers
  def fixture_path(filename='')
    File.join(File.dirname(__FILE__), 'fixtures', filename)
  end
end

RSpec.configure do |conf|
  conf.include Rack::Test::Methods
  conf.include TestHelpers
end

# ugly hack to show app errors when running rspec ;)
module FakeDropbox
  class Server
    configure :test do
      disable :raise_errors
    end

    error do
      e = env['sinatra.error']
      puts e.to_s
      puts e.backtrace.join("\n")
    end
  end
end

def app
  FakeDropbox::Server
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fake_dropbox-0.2.0 spec/spec_helper.rb
fake_dropbox-0.1.0 spec/spec_helper.rb