Sha256: 25885715544417c055d81d1bfdac74ed06183e081d12da50f6c2cb708dde502b

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

require File.expand_path('spec_helper', __dir__)

describe Danger::Changelog::ChangelogPlaceholderLine do
  context 'with a custom placeholder line' do
    before do
      Danger::Changelog.config.placeholder_line = "* Nothing yet here.\n"
    end

    context 'when line is equal to placeholder_line from config' do
      it_behaves_like 'validates as changelog placeholder line', "* Nothing yet here.\n"
      it_behaves_like 'valid changelog placeholder line', "* Nothing yet here.\n"
    end

    context 'when line is not equal to placeholder_line from config' do
      it_behaves_like 'does not validate as changelog placeholder line', "* Put your contribution here.\n"
      it_behaves_like 'invalid changelog placeholder line', "* Put your contribution here.\n"
    end
  end

  context 'with a blank placeholder line' do
    before do
      Danger::Changelog.config.placeholder_line = nil
    end

    context 'when line is not blank' do
      it_behaves_like 'does not validate as changelog placeholder line', "* Whatever.\n"
      it_behaves_like 'invalid changelog placeholder line', "* Whatever.\n"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-changelog-0.6.0 spec/changelog_placeholder_line_spec.rb