Spec: Config parse fail message tested

This commit is contained in:
Olle Jonsson 2016-03-19 15:20:48 +01:00
parent 29b5ef3d53
commit a997d2417d

View File

@ -19,11 +19,11 @@ describe GitHubChangelogGenerator::ParserFile do
context "when file is incorrect" do
let(:options) { {} }
let(:options_before_change) { options.dup }
let(:file) { StringIO.new("unreleased_label: staging\nunreleased: false") }
let(:file) { StringIO.new("unreleased_label=staging\nunreleased: false") }
let(:parse) do
GitHubChangelogGenerator::ParserFile.new(options, file)
end
it { expect { parse.parse! }.to raise_error(GitHubChangelogGenerator::ParserError) }
it { expect { parse.parse! }.to raise_error(/line #2/) }
end
context "when override default values" do