Sha256: 8fe7552feffb271ca48bb697da19cdf2ab6c84e0d7b1c7d8f5275ecc30bb5b83
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 KB
Contents
# encoding: utf-8 require 'spec_helper' describe GithubCLI::Commands::Contents do let(:format) { 'table' } let(:user) { 'peter-murach' } let(:repo) { 'github_cli' } let(:path) { 'README.md' } let(:api_class) { GithubCLI::Content } it "invokes content:readme" do api_class.should_receive(:readme).with(user, repo, {}, format) subject.invoke "content:readme", [user, repo] end it "invokes content:readme --ref" do api_class.should_receive(:readme).with(user, repo, {'ref'=>'master'}, format) subject.invoke "content:readme", [user, repo], :ref => "master" end it "invokes content:get" do api_class.should_receive(:get).with(user, repo, path, {}, format) subject.invoke "content:get", [user, repo, path] end it "invokes content:get --ref" do api_class.should_receive(:get).with(user, repo, path,{'ref'=>'master'},format) subject.invoke "content:get", [user, repo, path], :ref => "master" end it "invokes content:archive" do api_class.should_receive(:archive).with(user, repo, {}, format) subject.invoke "content:archive", [user, repo] end it "invokes content:archive --ref" do api_class.should_receive(:archive).with(user, repo, {'ref'=>'master'}, format) subject.invoke "content:archive", [user, repo], :ref => 'master' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
github_cli-0.5.9 | spec/github_cli/commands/contents_spec.rb |
github_cli-0.5.8 | spec/github_cli/commands/contents_spec.rb |