Spec: Smaller help functions
This commit is contained in:
parent
01a254e412
commit
ceb1b5f843
|
@ -1,19 +1,14 @@
|
||||||
|
describe GitHubChangelogGenerator::Generator do
|
||||||
def tag_mash_with_name(tag)
|
def tag_mash_with_name(tag)
|
||||||
mash_tag = Hashie::Mash.new
|
Hashie::Mash.new.tap {|mash_tag| mash_tag.name = tag }
|
||||||
mash_tag.name = tag
|
|
||||||
mash_tag
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags_mash_from_strings(tags_strings)
|
def tags_mash_from_strings(tags_strings)
|
||||||
mash_array = []
|
tags_strings.map do |tag|
|
||||||
tags_strings.each do |tag|
|
tag_mash_with_name(tag)
|
||||||
mash_tag = tag_mash_with_name(tag)
|
|
||||||
mash_array << mash_tag
|
|
||||||
end
|
end
|
||||||
mash_array
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe GitHubChangelogGenerator::Generator do
|
|
||||||
describe "#filter_between_tags" do
|
describe "#filter_between_tags" do
|
||||||
context "when between_tags nil" do
|
context "when between_tags nil" do
|
||||||
before do
|
before do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user