test/node/test_spread_entrance.rb in zold-0.15.0 vs test/node/test_spread_entrance.rb in zold-0.16.0
- old
+ new
@@ -33,11 +33,11 @@
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
# License:: MIT
class TestSpreadEntrance < Minitest::Test
def test_renders_json
- FakeHome.new.run do |home|
+ FakeHome.new(log: test_log).run do |home|
wallet = home.create_wallet(Zold::Id.new)
Zold::SpreadEntrance.new(
Zold::Entrance.new(home.wallets, home.remotes, home.copies(wallet).root, 'x', log: test_log),
home.wallets, home.remotes, 'x', log: test_log
).start do |e|
@@ -45,16 +45,16 @@
end
end
end
def test_ignores_duplicates
- FakeHome.new.run do |home|
+ FakeHome.new(log: test_log).run do |home|
FakeNode.new(log: test_log).run(['--ignore-score-weakness']) do |port|
wallet = home.create_wallet
remotes = home.remotes
remotes.add('localhost', port)
Zold::SpreadEntrance.new(FakeEntrance.new, home.wallets, remotes, 'x', log: test_log).start do |e|
- 8.times { e.push(wallet.id, File.read(wallet.path)) }
+ 8.times { e.push(wallet.id, IO.read(wallet.path)) }
assert(e.to_json[:modified] < 2, "It's too big: #{e.to_json[:modified]}")
end
end
end
end