Module: RSpec::ShellCommand::Matchers

Defined in:
lib/rspec/shell_command/matchers.rb,
lib/rspec/shell_command/matchers/base.rb,
lib/rspec/shell_command/matchers/output.rb,
lib/rspec/shell_command/matchers/success.rb,
lib/rspec/shell_command/matchers/exit_with.rb

Overview

Provide matcher methods

Defined Under Namespace

Classes: Base, ExitWith, Output, Success

Instance Method Summary collapse

Instance Method Details

#exit_with(status) ⇒ Object



12
13
14
# File 'lib/rspec/shell_command/matchers.rb', line 12

def exit_with(status)
  ExitWith.new(status)
end

#output(*args, &block) ⇒ Object



16
17
18
19
20
# File 'lib/rspec/shell_command/matchers.rb', line 16

def output(*args, &block)
  orig = super
  expected = args.first
  Output.new(expected, orig)
end

#successObject



8
9
10
# File 'lib/rspec/shell_command/matchers.rb', line 8

def success
  Success.new
end