Skip to content

Instantly share code, notes, and snippets.

@duff
Created November 30, 2010 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duff/722412 to your computer and use it in GitHub Desktop.
Save duff/722412 to your computer and use it in GitHub Desktop.
Rspec.configure do |config|
config.mock_with :mocha
config.filter_run :focused => true
config.alias_example_to :fit, :focused => true
config.after(:each) do
$test_server.recycle if $test_server
end
end
# In spec/support/test_server.rb
require 'riak/test_server'
unless $test_server
begin
require 'yaml'
config = YAML.load_file("spec/support/test_server.yml")
$test_server = Riak::TestServer.new(config.symbolize_keys)
$test_server.prepare!
$test_server.start
Ripple.config = {:port => 9000 }
at_exit { $test_server.cleanup }
rescue => e
warn "Can't run Riak::TestServer specs. Specify the location of your Riak installation in spec/support/test_server.yml. See Riak::TestServer docs for more info."
warn e.inspect
$test_server = nil
end
end
# In spec/support
bin_dir: /Users/duff/code/riak/rel/riak/bin
temp_dir: /Users/duff/code/riak_test_server/core_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment