From 21d41756b84bab7972af1030069b256cb1a168d8 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 24 Mar 2016 13:00:02 +0000 Subject: [PATCH] regex test include regex identifier --- spec/unit/generator/generator_tags_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/unit/generator/generator_tags_spec.rb b/spec/unit/generator/generator_tags_spec.rb index 54be1dd..0713551 100644 --- a/spec/unit/generator/generator_tags_spec.rb +++ b/spec/unit/generator/generator_tags_spec.rb @@ -77,13 +77,13 @@ describe GitHubChangelogGenerator::Generator do subject { generator.filter_excluded_tags(tags_mash_from_strings(%w(1 2 3))) } context "with matching regex" do - let(:generator) { GitHubChangelogGenerator::Generator.new(exclude_tags_regex: '2') } + let(:generator) { GitHubChangelogGenerator::Generator.new(exclude_tags_regex: '[23]') } it { is_expected.to be_a Array } - it { is_expected.to match_array(tags_mash_from_strings(%w(1 3))) } + it { is_expected.to match_array(tags_mash_from_strings(%w(1))) } end context "with non-matching regex" do - let(:generator) { GitHubChangelogGenerator::Generator.new(exclude_tags_regex: 'invalid tags') } + let(:generator) { GitHubChangelogGenerator::Generator.new(exclude_tags_regex: '[45]') } it { is_expected.to be_a Array } it { is_expected.to match_array(tags_mash_from_strings(%w(1 2 3))) } end