Sha256: 3453b2014e0ac9cdd80e1e17ef0494cd5d025f9ab556113d808248d407e30e5c

Contents?: true

Size: 851 Bytes

Versions: 7

Compression:

Stored size: 851 Bytes

Contents

require_relative 'spec_helper'

describe Commit do

  let(:breaking_change) { Commit.new(subject: '[Breaking] Removed thing') }
  let(:fix_change) { Commit.new(subject: 'This is a fix') }
  let(:minor_change) { Commit.new(subject: 'This introduces a feature') }

  describe '.(major|patch|minor)?' do
    it 'detects major changes' do
      expect(breaking_change).to     be_major
      expect(fix_change)     .not_to be_major
      expect(minor_change)   .not_to be_major
    end
    it 'detects minor changes' do
      expect(breaking_change).not_to be_minor
      expect(fix_change)     .not_to be_minor
      expect(minor_change)   .to     be_minor
    end
    it 'detects patch changes' do
      expect(breaking_change).not_to be_patch
      expect(fix_change)     .to     be_patch
      expect(minor_change)   .not_to be_patch
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cookbook-release-0.4.4 spec/commit_spec.rb
cookbook-release-0.4.3 spec/commit_spec.rb
cookbook-release-0.4.2 spec/commit_spec.rb
cookbook-release-0.4.1 spec/commit_spec.rb
cookbook-release-0.3.1 spec/commit_spec.rb
cookbook-release-0.3 spec/commit_spec.rb
cookbook-release-0.1 spec/commit_spec.rb