Sha256: d12f11dd05f96aebaaeb05e5c0d96c5f9e48d1ed2bf266ce405ff64be4675d89
Contents?: true
Size: 959 Bytes
Versions: 5
Compression:
Stored size: 959 Bytes
Contents
require 'spec_helper' describe "perfmonger command" do it "should be an executable" do expect(File.executable?(perfmonger_bin)).to be true end it 'should print help and exit with failure when no arguments given' do cmd = "#{perfmonger_bin}" run(cmd) assert_success(false) expect(stdout_from(cmd)).to match(/^Usage: perfmonger/) end it 'should print help and exit with success when --help is given' do ["-h", "--help"].each do |arg| cmd = "#{perfmonger_bin} #{arg}" run(cmd) assert_success(true) expect(stdout_from(cmd)).to match(/^Usage: perfmonger/) end end it 'should print version number if --version given' do cmd = "#{perfmonger_bin} --version" run(cmd) assert_success(true) expect(stdout_from(cmd)).to include(PerfMonger::VERSION) end it 'fails if unknown subcommand given' do cmd = "#{perfmonger_bin} piyo" run(cmd) assert_success(false) end end
Version data entries
5 entries across 5 versions & 1 rubygems