Created
November 30, 2010 21:11
-
-
Save duff/722412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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