Sha256: 6b06f5b8bd1219a41dad34913cb85cc6ecfbc1ce93fc33612ad9af05e2fff66b

Contents?: true

Size: 675 Bytes

Versions: 3

Compression:

Stored size: 675 Bytes

Contents

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'minitest/spec'
require 'minitest/unit'
require 'swift'

class MiniTest::Unit::TestCase
end

class MiniTest::Spec
  def self.supported_by *adapters, &block
    adapters.each do |adapter|
      begin
        Swift.setup :default, adapter, db: 'swift_test'
      rescue => error
        warn "Unable to setup 'swift_test' db for #{adapter}, #{error.message}. Skipping..."
        next
      end

      describe("Adapter #{adapter.name}") do
        before do
          Swift.setup :default, adapter, db: 'swift_test'
        end
        block.call(adapter)
      end
    end
  end
end

MiniTest::Unit.autorun

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
swift-0.6.1 test/helper.rb
swift-0.6.0 test/helper.rb
swift-0.5.1 test/helper.rb