Sha256: 325dd13665b6f0c99ffd8407e423c16a6190e6c245cf62e662fa452b96e19bf1

Contents?: true

Size: 592 Bytes

Versions: 13

Compression:

Stored size: 592 Bytes

Contents

require 'spec_helper'

describe Semvergen::Shell do

  let :shell do
    Semvergen::Shell.new(command_map)
  end

  describe :git_index_dirty? do

    let :with_added do
      <<-STR
 M file_a
A  file_b
AM file_c
?? file_d
      STR
    end

    let :with_only_changed do
      <<-STR
?? file_x
      STR
    end

    it "returns true when index dirty" do
      expect(Semvergen::Shell.new("git status --porcelain" => with_added).git_index_dirty?).to be_truthy
      expect(Semvergen::Shell.new("git status --porcelain" => with_only_changed).git_index_dirty?).to be_falsey
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
semvergen-1.12.0 spec/semvergen/shell_spec.rb
semvergen-1.11.0 spec/semvergen/shell_spec.rb
semvergen-1.10.0 spec/semvergen/shell_spec.rb
semvergen-1.9.2 spec/semvergen/shell_spec.rb
semvergen-1.9.1 spec/semvergen/shell_spec.rb
semvergen-1.7.1 spec/semvergen/shell_spec.rb
semvergen-1.6.0 spec/semvergen/shell_spec.rb
semvergen-1.4.3 spec/semvergen/shell_spec.rb
semvergen-1.4.0 spec/semvergen/shell_spec.rb
semvergen-1.3.0 spec/semvergen/shell_spec.rb
semvergen-1.2.0 spec/semvergen/shell_spec.rb
semvergen-1.1.0 spec/semvergen/shell_spec.rb
semvergen-1.0.0 spec/semvergen/shell_spec.rb