Sha256: 7de602e823926299afa5d595cfac186d33ccf868e788cdbc402dc3b330633b72

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'test_helper'

module Gemdiff
  class GemUpdaterTest < MiniTest::Spec
    describe "#update" do
      it "updates the gem" do
        updater = GemUpdater.new("x")
        updater.expects :bundle_update
        updater.update
      end
    end

    describe "#commit" do
      it "adds a git commit for a gem update" do
        updater = GemUpdater.new("aws-sdk")
        updater.stubs git_changed_line: "+    aws-sdk (1.35.0)"
        updater.expects(:git_add_and_commit_lockfile).with("1.35.0")
        assert updater.commit
      end
    end

    describe "#reset" do
      it "resets Gemfile.lock" do
        updater = GemUpdater.new("x")
        updater.expects :git_reset
        updater.reset
      end
    end

    describe "#diff" do
      it "returns git diff" do
        updater = GemUpdater.new("x")
        updater.expects :git_diff
        updater.diff
      end
    end

    describe "#show" do
      it "returns git show" do
        updater = GemUpdater.new("x")
        updater.expects :git_show
        updater.show
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gemdiff-0.5.0 test/gem_updater_test.rb
gemdiff-0.4.2 test/gem_updater_test.rb
gemdiff-0.4.1 test/gem_updater_test.rb
gemdiff-0.4.0 test/gem_updater_test.rb