test/test_utils.rb in couchbase-jruby-client-0.1.2 vs test/test_utils.rb in couchbase-jruby-client-0.1.3

- old
+ new

@@ -17,18 +17,10 @@ require File.join(File.dirname(__FILE__), 'setup') class TestUtils < MiniTest::Test - def setup - @mock = start_mock - end - - def teardown - stop_mock(@mock) - end - def test_complex_startkey assert_equal "all_docs?startkey=%5B%22Deadmau5%22%2C%22%22%5D", Couchbase::Utils.build_query("all_docs", :startkey => ["Deadmau5", ""]) end def test_it_provides_enough_info_with_value_error @@ -36,15 +28,14 @@ alias dump_good dump def dump(obj) raise ArgumentError, "cannot accept your object" end end - connection = Couchbase.new(:hostname => @mock.host, :port => @mock.port) assert_raises(Couchbase::Error::ValueFormat) do - connection.set(uniq_id, "foo") + cb.set(uniq_id, "foo") end begin - connection.set(uniq_id, "foo") + cb.set(uniq_id, "foo") rescue Couchbase::Error::ValueFormat => ex assert_match /cannot accept your object/, ex.to_s assert_instance_of ArgumentError, ex.inner_exception end ensure