File: test_stdout.rb

package info (click to toggle)
ruby-beaker-hostgenerator 1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,556 kB
  • sloc: ruby: 3,059; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'minitest/autorun'
require 'beaker-hostgenerator/cli'
require 'beaker-hostgenerator/data'

class TestStdout < Minitest::Test

  def setup
    @stderr = StringIO.new
    @stdout = StringIO.new

    $stderr = @stderr
    $stdout = @stdout
  end

  def test_default_list_output
    BeakerHostGenerator::CLI.new(['--list']).execute!
    BeakerHostGenerator::Data.get_platforms(0).each do |spec_key|
      assert_match(/.*#{spec_key}.*/, @stdout.string)
    end
  end
end