Skip to content

Commit

Permalink
safe run for rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
uu59 committed Dec 11, 2010
1 parent 29fb103 commit 8cac51b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions spec/helper.rb
@@ -1,12 +1,23 @@
# -- coding: utf-8

=begin
!!!!!!!!!!!!!
!! CAUTION !!
!!!!!!!!!!!!!
This script access http://0.0.0.0:19999/ and destroy all records.
Be carefully for run, and run `ktserver -port 19999 '*'` before testing.
=end

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib")
require "rubygems"
require "kyototycoon.rb"

describe do
before(:all) do
@kt = KyotoTycoon.new
@kt = KyotoTycoon.new('0.0.0.0', 19999)
@kt.serializer=:default # or :msgpack
@kt.logger=nil
end
Expand All @@ -19,7 +30,7 @@
kt = KyotoTycoon.new('www.example.com', 11111)
kt.connect_timeout = 0.1
kt.servers << ['example.net', 1978]
kt.servers << ['0.0.0.0', 1978]
kt.servers << ['0.0.0.0', 19999]
kt['foo'] = 'bar'
kt[:foo].should == 'bar'
end
Expand Down

0 comments on commit 8cac51b

Please sign in to comment.