Sha256: a3799d5ee3478aa05da530232e25a15bc056136e087b1563aece9eef2bf8022f

Contents?: true

Size: 408 Bytes

Versions: 4

Compression:

Stored size: 408 Bytes

Contents

module Assert::View::Helpers

  module CaptureOutput

    def captured_output(output)
      if !output.empty?
        # TODO: move to the base view
        [ captured_output_start_msg,
          output + captured_output_end_msg
        ].join("\n")
      end
    end

    def captured_output_start_msg
      "--- stdout ---"
    end
    def captured_output_end_msg
      "--------------"
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
assert-1.1.0 lib/assert/view/helpers/capture_output.rb
assert-1.0.0 lib/assert/view/helpers/capture_output.rb
assert-0.8.1 lib/assert/view/helpers/capture_output.rb
assert-0.8.0 lib/assert/view/helpers/capture_output.rb