Spec: option name translation tested

This commit is contained in:
Olle Jonsson 2016-03-17 21:38:28 +01:00
parent d0bd44e0c8
commit 655aa965a7
2 changed files with 9 additions and 1 deletions

View File

@ -1 +1,2 @@
exclude-labels=73a91042-da6f-11e5-9335-1040f38d7f90,7adf83b4-da6f-11e5-ae18-1040f38d7f90
header_label=# My changelog

View File

@ -43,11 +43,18 @@ describe GitHubChangelogGenerator::ParserFile do
params_file: "spec/files/github_changelog_params_327"
}
end
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
it "translates given header_label into the :header option" do
expect { parse.parse! }.to change { options[:header] }
.from(nil)
.to("# My changelog")
end
end
end
end