Skip to content

Commit

Permalink
Fixed SCM::Tag specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Apr 27, 2012
1 parent f63dac5 commit 463149c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/scm/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'rubygems/tasks/scm/tag'

describe Gem::Tasks::SCM::Tag do
let(:version) { '1.2.3' }
let(:version) { '1.2.3' }

describe "#version_tag" do
context "defaults" do
Expand Down Expand Up @@ -39,14 +39,15 @@
end

describe "#tag!" do
let(:name) { 'v1.2.3' }
let(:name) { "v#{version}" }
let(:message) { "Tagging #{name}" }

context "git" do
include_context "rake"

it "should run `git tag`" do
subject.project.stub!(:scm).and_return(:git)
subject.should_receive(:run).with('git', 'tag', name)
subject.should_receive(:run).with('git', 'tag', '-m', message, name)

subject.tag!(name)
end
Expand All @@ -57,7 +58,7 @@

it "should run `hg tag`" do
subject.project.stub!(:scm).and_return(:hg)
subject.should_receive(:run).with('hg', 'tag', name)
subject.should_receive(:run).with('hg', 'tag', '-m', message, name)

subject.tag!(name)
end
Expand Down

0 comments on commit 463149c

Please sign in to comment.