Sha256: 609b7874827341b7014dfa0cec9e837773d28af40d5f7c3f5c08c8ffe1bb8a10
Contents?: true
Size: 630 Bytes
Versions: 2
Compression:
Stored size: 630 Bytes
Contents
require "spec_helper" describe LastCommit do let(:branch) { "master" } subject(:last_commit) { described_class.new(DummyRepo.instance.path, branch) } its(:message) { should eq "Initial commit" } its(:sha) { should eq "08feadfc6075dbeb696aa61e9d21383b2a6a0f0e" } context "when branch doesn't exist" do let(:branch) { "bad_branch_name" } it "raises error when fetching last commit message" do expect { last_commit.message }.to raise_error(ArgumentError) end it "raises error when fetching last commit SHA" do expect { last_commit.sha }.to raise_error(ArgumentError) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
last_commit-0.0.2 | spec/last_commit_spec.rb |
last_commit-0.0.1 | spec/last_commit_spec.rb |