Sha256: ceca6362b3675bd965d0970fdf1d671b8865397b7479ebae8b6e1eaf9caa93b5
Contents?: true
Size: 1.3 KB
Versions: 2
Compression:
Stored size: 1.3 KB
Contents
# encoding: utf-8 require 'spec_helper' describe GithubCLI::Commands::Contents do let(:format) { {'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.6.1 | spec/github_cli/commands/contents_spec.rb |
github_cli-0.6.0 | spec/github_cli/commands/contents_spec.rb |