test/commands/test_remote.rb in zold-0.18.9 vs test/commands/test_remote.rb in zold-0.19.0

- old
+ new

@@ -191,11 +191,11 @@ end def test_select_respects_max_nodes_option Dir.mktmpdir do |dir| remotes = Zold::Remotes.new(file: File.join(dir, 'remotes.txt')) - remotes.defaults + remotes.masters zero = Zold::Score::ZERO cmd = Zold::Remote.new(remotes: remotes, log: test_log) (5000..5010).each do |port| stub_request(:get, "http://#{zero.host}:#{zero.port}/remotes").to_return( status: 200, @@ -213,20 +213,20 @@ version: Zold::VERSION }.to_json ) cmd.run(%W[remote add localhost #{port}]) end - assert_equal(11 + File.readlines('resources/remotes').count, remotes.all.count) + assert_equal(11 + File.readlines('resources/masters').count, remotes.all.count) cmd.run(%w[remote select --max-nodes=5]) assert_equal(5, remotes.all.count) end end - def test_sets_defaults + def test_sets_masters Dir.mktmpdir do |dir| remotes = Zold::Remotes.new(file: File.join(dir, 'remotes.txt')) cmd = Zold::Remote.new(remotes: remotes, log: test_log) - cmd.run(%w[remote defaults]) + cmd.run(%w[remote masters]) assert(!remotes.all.empty?) end end end