Sha256: d8b64ff78babf18a30cbb120aee251838bc91324aaf1f85e870e1e28c56e36d4

Contents?: true

Size: 452 Bytes

Versions: 4

Compression:

Stored size: 452 Bytes

Contents

def vmc_ok(argv)
  with_output_to do |out|
    code = VMC::CLI.start(argv + ["--no-script"])
    yield strip_progress_dots(out.string) if block_given?
    expect(code).to eq 0
  end
end

def vmc_fail(argv)
  with_output_to do |out|
    code = VMC::CLI.start(argv + ["--no-script"])
    yield strip_progress_dots(out.string) if block_given?
    expect(code).to eq 1
  end
end

def strip_progress_dots(str)
  str.gsub(/\.  \x08([\x08\. ]+)/, "... ")
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vmc-0.5.0.beta.5 spec/support/feature_helpers.rb
vmc-0.5.0.beta.4 spec/support/feature_helpers.rb
vmc-0.5.0.beta.3 spec/support/feature_helpers.rb
vmc-0.5.0.beta.2 spec/support/feature_helpers.rb