remove --between_tags option (#501)

This commit is contained in:
Lucas Huang
2017-05-24 15:29:31 -07:00
committed by Olle Jonsson
parent 6707927c1e
commit e9ee9556ce
6 changed files with 2 additions and 95 deletions

View File

@@ -13,66 +13,6 @@ describe GitHubChangelogGenerator::Generator do
end
end
describe "#filter_between_tags" do
context "when between_tags nil" do
before do
@generator = GitHubChangelogGenerator::Generator.new(between_tags: nil)
end
subject do
@generator.get_filtered_tags(tags_from_strings(%w[1 2 3]))
end
it { is_expected.to be_a(Array) }
it { is_expected.to match_array(tags_from_strings(%w[1 2 3])) }
end
context "when between_tags same as input array" do
before do
@generator = GitHubChangelogGenerator::Generator.new(between_tags: %w[1 2 3])
end
subject do
@generator.get_filtered_tags(tags_from_strings(%w[1 2 3]))
end
it { is_expected.to be_a(Array) }
it { is_expected.to match_array(tags_from_strings(%w[1 2 3])) }
end
context "when between_tags filled with correct values" do
before do
@generator = GitHubChangelogGenerator::Generator.new(between_tags: %w[1 2])
end
subject do
@generator.get_filtered_tags(tags_from_strings(%w[1 2 3]))
end
it { is_expected.to be_a(Array) }
it { is_expected.to match_array(tags_from_strings(%w[1 2])) }
end
context "when between_tags filled with invalid values" do
before do
@generator = GitHubChangelogGenerator::Generator.new(between_tags: %w[1 q w])
end
subject do
@generator.get_filtered_tags(tags_from_strings(%w[1 2 3]))
end
it { is_expected.to be_a(Array) }
it { is_expected.to match_array(tags_from_strings(%w[1])) }
end
end
describe "#get_filtered_tags" do
subject do
generator.get_filtered_tags(tags_from_strings(%w[1 2 3 4 5]))
end
context "respects between tags" do
let(:generator) { GitHubChangelogGenerator::Generator.new(between_tags: %w[1 2 3]) }
it { is_expected.to be_a Array }
it { is_expected.to match_array(tags_from_strings(%w[1 2 3])) }
end
end
describe "#filter_excluded_tags" do
subject { generator.filter_excluded_tags(tags_from_strings(%w[1 2 3])) }