From 575f42f6528bfd24a6672c56c10c1c6c92f47ae9 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 23 Feb 2016 22:24:10 +0100 Subject: [PATCH] Test case for #327 --- spec/files/github_changelog_params_327 | 1 + spec/unit/parse_file_spec.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 spec/files/github_changelog_params_327 diff --git a/spec/files/github_changelog_params_327 b/spec/files/github_changelog_params_327 new file mode 100644 index 0000000..21fce1c --- /dev/null +++ b/spec/files/github_changelog_params_327 @@ -0,0 +1 @@ +exclude-labels=73a91042-da6f-11e5-9335-1040f38d7f90,7adf83b4-da6f-11e5-ae18-1040f38d7f90 \ No newline at end of file diff --git a/spec/unit/parse_file_spec.rb b/spec/unit/parse_file_spec.rb index 92d56e6..e08168d 100644 --- a/spec/unit/parse_file_spec.rb +++ b/spec/unit/parse_file_spec.rb @@ -36,6 +36,20 @@ describe GitHubChangelogGenerator::ParserFile do unreleased: false, header: "=== Changelog ===")) end + + context "turns exclude-label into an Array", bug: '#327' do + let(:options) { + { + params_file: 'spec/files/github_changelog_params_327' + } + } + it "reads exclude_labels into an Array" do + expect { parse.parse! }.to change { options[:exclude_labels] } + .from(nil) + .to(["73a91042-da6f-11e5-9335-1040f38d7f90", "7adf83b4-da6f-11e5-ae18-1040f38d7f90"]) + + end + end end end end