Sha256: 3b1845a4d8f1d782fa0a75c1c4e69061bf9a05136757560585a93161b44be23c

Contents?: true

Size: 913 Bytes

Versions: 2

Compression:

Stored size: 913 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require "hackpad/cli/runner"
require "hackpad/cli/client"

describe Hackpad::Cli::Runner do

  before :each do
    @cli = Hackpad::Cli::Runner.new
    Hackpad::Cli::Client.stub(:new, {}).and_return(Object)
  end

  it "calls the search method in client class" do
    Object.stub(:search)
    @cli.shell.mute do
      @cli.search "xxx"
    end
  end

  it "calls the list method in client class" do
    Object.stub(:list)
    @cli.shell.mute do
      @cli.list
    end
  end

  it "calls the list method in client class" do
    Object.stub(:list)
    @cli.shell.mute do
      @cli.list
    end
  end

  it "calls the info method in client class" do
    Object.stub(:info)
    @cli.shell.mute do
      @cli.info 'pad'
    end
  end

  it "calls the show method in client class" do
    Object.stub(:show)
    @cli.shell.mute do
      @cli.show 'pad', 'md'
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hackpad-cli-0.0.6 spec/lib/hackpad/cli/runner_spec.rb
hackpad-cli-0.0.5 spec/lib/hackpad/cli/runner_spec.rb