Skip to content

Instantly share code, notes, and snippets.

@duff duff/spec_helper.rb
Created Nov 30, 2010

Embed
What would you like to do?
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
You can’t perform that action at this time.