Sha256: aa87821989b483a077aad50352a9eda788600d3e9e639d494b494c375d45ea52

Contents?: true

Size: 894 Bytes

Versions: 8

Compression:

Stored size: 894 Bytes

Contents

require "spec_helper"

describe "rake bump" do
  inside_of_folder("spec/fixture")

  before do
    write "VERSION", "1.2.3\n"
    write "Rakefile", "require File.expand_path('../../../lib/bump/tasks', __FILE__)"
    raise unless system("git add VERSION")
  end

  it "bumps a version" do
    output = run "rake bump:minor"
    output.should include("1.3.0")
    read("VERSION").should == "1.3.0\n"
    `git log -1 --pretty=format:'%s'`.should == "v1.3.0"
  end

  it "sets a version" do
    output = run "VERSION=1.3.0 rake bump:set"
    output.should include("1.3.0")
    read("VERSION").should == "1.3.0\n"
    `git log -1 --pretty=format:'%s'`.should == "v1.3.0"
  end

  it "fails when it cannot bump" do
    write "VERSION", "AAA"
    run "rake bump:minor", :fail => true
  end

  it "shows the version" do
    result = run "rake bump:current"
    result.should include("1.2.3")
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
bump-0.5.1 spec/bump/tasks_spec.rb
bumpz-0.5.3 spec/bump/tasks_spec.rb
bumpz-0.5.0 spec/bump/tasks_spec.rb
bump-0.5.0 spec/bump/tasks_spec.rb
bump-0.4.3 spec/bump/tasks_spec.rb
bump-0.4.2 spec/bump/tasks_spec.rb
bump-0.4.1 spec/bump/tasks_spec.rb
bump-0.4.0 spec/bump/tasks_spec.rb