Sha256: 879708258dd0117116c2ce3623b708ec64c5c84420eb6382f9e441afbe158dba

Contents?: true

Size: 930 Bytes

Versions: 1

Compression:

Stored size: 930 Bytes

Contents

require 'riak/test_server'

RSpec.configure do |config|
  config.before(:each, :integration => true) do
    unless $test_server
      begin
        require 'yaml'
        config = YAML.load_file("spec/support/test_server.yml")
        $test_server = Riak::TestServer.create(:root => config['root'],
                                               :source => config['source'],
                                               :min_port => config['min_port'] || 15000)
        at_exit { $test_server.stop }
      rescue => e
        pending("Can't run ripple integration specs without the test server. Specify the location of your Riak installation in spec/support/test_server.yml\n#{e.inspect}")
      end
    end
    Ripple.config = {
      :http_port => $test_server.http_port,
      :pb_port => $test_server.pb_port
    }
    $test_server.start
  end

  config.after(:each, :integration => true) do
    $test_server.drop
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ripple-1.0.0.beta spec/support/test_server.rb