Sha256: e7ccba7b04fd525ab0efaed2a8fa56bd81dab89a59129a9d9e3d6d85cbffb465

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

Shell = Class.new do
  def say(*args)
    args.first
  end
end

describe GithubCLI::UI do
  let(:shell)   { Shell.new }
  let(:message) { "error" }
  let(:object)  { described_class.new(shell) }

  subject { object }

  it "confirms message" do
    expect(object.confirm(message)).to eql(message)
  end

  it "debugs the error message" do
    error = double(:error, message: message,
                           class: 'Exception',
                           backtrace: ['line1', 'line2'])
    expect(object.debug(error)).to eql("Exception: error\nline1\nline2")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
github_cli-0.6.2 spec/github_cli/ui_spec.rb