test/server_test.rb in mattly-exegesis-0.2.2 vs test/server_test.rb in mattly-exegesis-0.2.3
- old
+ new
@@ -1,26 +1,26 @@
require File.join(File.dirname(__FILE__), 'test_helper.rb')
-class ExegesisServerTest < Test::Unit::TestCase
+describe Exegesis::Server do
- before(:all) do
+ before do
@db = 'http://localhost:5984/exegesis-test'
RestClient.delete @db rescue nil
RestClient.delete "#{@db}-2" rescue nil
RestClient.put @db, ''
@server = Exegesis::Server.new('http://localhost:5984')
end
- context "listing databases" do
- expect { @server.databases.include?('exegesis-test').will == true }
+ describe "listing databases" do
+ expect { @server.databases.must_include('exegesis-test') }
end
- context "creating a database" do
+ describe "creating a database" do
before do
@response = @server.create_database('exegesis-test-2')
end
- expect { @response['ok'].will == true }
+ expect { assert @response['ok'] }
end
end
\ No newline at end of file