Sha256: ee4814a2f4089601ac2cf83b715124b0e01d942fc3db8b14300b81f5a51132b8
Contents?: true
Size: 917 Bytes
Versions: 1
Compression:
Stored size: 917 Bytes
Contents
# ********** Copyright Viacom, Inc. Apache 2.0 ********** require_relative "test_helper.rb" module RokuBuilder class ProfilerTest < Minitest::Test def test_profiler_stats waitfor = Proc.new do |config, &blk| assert_equal(/.+/, config["Match"]) assert_equal(5, config["Timeout"]) txt = "<All_Nodes><NodeA /><NodeB /><NodeC><NodeD /></NodeC></All_Nodes>\n" blk.call(txt) true end connection = Minitest::Mock.new device_config = { ip: "111.222.333", user: "user", password: "password" } profiler = Profiler.new(**device_config) connection.expect(:puts, nil, ["sgnodes all\n"]) connection.expect(:waitfor, nil, &waitfor) Net::Telnet.stub(:new, connection) do profiler.stub(:printf, nil) do profiler.run(command: :stats) end end connection.verify end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roku_builder-3.13.0 | test/roku_builder/test_profiler.rb |