Sha256: e3c42bdca3dd975762ca86602918db71528be1930fb8dda088750d6ed34dbd05

Contents?: true

Size: 1.1 KB

Versions: 6

Compression:

Stored size: 1.1 KB

Contents

# encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Watching do
  let(:format) { 'table' }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:api_class) { GithubCLI::Watching }

  it "invokes watch:list" do
    api_class.should_receive(:list).with(user, repo, {}, format)
    subject.invoke "watch:list", [user, repo]
  end

  it "invokes watch:watched" do
    api_class.should_receive(:watched).with({}, format)
    subject.invoke "watch:watched"
  end

  it "invokes watch:watched --user" do
    api_class.should_receive(:watched).with({"user" => user}, format)
    subject.invoke "watch:watched", [], {:user => user}
  end

  it "invokes watch:watching" do
    api_class.should_receive(:watching?).with(user, repo, {}, format)
    subject.invoke "watch:watching", [user, repo]
  end

  it "invokes watch:start" do
    api_class.should_receive(:start).with(user, repo, {}, format)
    subject.invoke "watch:start", [user, repo]
  end

  it "invokes watch:stop" do
    api_class.should_receive(:stop).with(user, repo, {}, format)
    subject.invoke "watch:stop", [user, repo]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
github_cli-0.5.9 spec/github_cli/commands/watching_spec.rb
github_cli-0.5.8 spec/github_cli/commands/watching_spec.rb
github_cli-0.5.7 spec/github_cli/commands/watching_spec.rb
github_cli-0.5.6 spec/github_cli/commands/watching_spec.rb
github_cli-0.5.5 spec/github_cli/commands/watching_spec.rb
github_cli-0.5.4 spec/github_cli/commands/watching_spec.rb