spec/kamerling/server_runner_spec.rb in kamerling-0.0.1 vs spec/kamerling/server_runner_spec.rb in kamerling-0.0.2
- old
+ new
@@ -18,11 +18,11 @@
stub(udp_cl).new(addr: udp_addr) { udp }
end
describe '.new' do
it 'hooks to the given database' do
- args = %w[--host 0.0.0.0 --db sqlite::memory:]
+ args = %w(--host 0.0.0.0 --db sqlite::memory:)
db = fake { Sequel::SQLite::Database }
orm = fake :sequel, as: :class
stub(orm).connect('sqlite::memory:') { db }
repos = fake :repos, as: :class
ServerRunner.new args, classes: classes, orm: orm, repos: repos
@@ -30,28 +30,28 @@
end
end
describe '#join' do
it 'joins all the created servers' do
- args = %w[--host 0.0.0.0 --http 1234]
+ args = %w(--host 0.0.0.0 --http 1234)
ServerRunner.new(args, classes: classes).join
http.must_have_received :join, []
tcp.wont_have_received :join, []
udp.wont_have_received :join, []
end
end
describe '#start' do
it 'starts the servers based on the given command-line parameters' do
- args = %w[--host 0.0.0.0 --http 1234 --tcp 3456 --udp 5678]
+ args = %w(--host 0.0.0.0 --http 1234 --tcp 3456 --udp 5678)
ServerRunner.new(args, classes: classes).start
http.must_have_received :start, []
tcp.must_have_received :start, []
udp.must_have_received :start, []
end
it 'starts only the servers for which the port was given' do
- args = %w[--host 0.0.0.0 --http 1234]
+ args = %w(--host 0.0.0.0 --http 1234)
ServerRunner.new(args, classes: classes).start
http.must_have_received :start, []
tcp.wont_have_received :start, []
udp.wont_have_received :start, []
end