class Cocaine::CommandLine::FakeRunner

Attributes

commands[R]

Public Class Methods

new() click to toggle source
# File lib/cocaine/command_line/runners/fake_runner.rb, line 7
def initialize
  @commands = []
end

Public Instance Methods

call(command, env = {}) click to toggle source
# File lib/cocaine/command_line/runners/fake_runner.rb, line 11
def call(command, env = {})
  commands << [command, env]
  ""
end
ran?(predicate_command) click to toggle source
# File lib/cocaine/command_line/runners/fake_runner.rb, line 16
def ran?(predicate_command)
  @commands.any?{|(command, env)| command =~ Regexp.new(predicate_command) }
end