Module: ShellCommands::Assertions

Extended by:
Test::Unit::Assertions
Includes:
Test::Unit::Assertions
Included in:
ShellCommands
Defined in:
app/models/shell_command.rb

Overview

trace

Instance Method Summary collapse

Instance Method Details

#assert_post_conditions(message = '') ⇒ Object

assert_pre_conditions


198
199
200
201
202
203
204
205
206
207
208
# File 'app/models/shell_command.rb', line 198

def assert_post_conditions(message='')
	message+="self=#{inspect}"
	puts unless success?&& @errors.empty?
	assert_empty(@errors, message+'expected errors to be empty\n')
	assert_equal(0, @process_status.exitstatus, message)
	assert_not_nil(@errors, "expect @errors to not be nil.")
	assert_not_nil(@process_status)
	assert_instance_of(Process::Status, @process_status)

	self # return for command chaining
end

#assert_pre_conditions(message = '') ⇒ Object


195
196
197
# File 'app/models/shell_command.rb', line 195

def assert_pre_conditions(message='')
	self # return for command chaining
end