include default options in tags tests

Signed-off-by: Tom Duffield <tom@chef.io>
This commit is contained in:
Tom Duffield 2016-11-20 09:57:23 -06:00 committed by Hunter Haugen
parent 5932cb730b
commit ce63f648ac
No known key found for this signature in database
GPG Key ID: EF99694AA599DDAD
2 changed files with 3 additions and 2 deletions

View File

@ -17,8 +17,9 @@ describe GitHubChangelogGenerator::Generator do
let(:all_tags) { tags_from_strings(%w(8 7 6 5 4 3 2 1)) } let(:all_tags) { tags_from_strings(%w(8 7 6 5 4 3 2 1)) }
let(:sorted_tags) { all_tags } let(:sorted_tags) { all_tags }
let(:default_options) { GitHubChangelogGenerator::Parser.default_options }
let(:options) { {} } let(:options) { {} }
let(:generator) { GitHubChangelogGenerator::Generator.new(options) } let(:generator) { described_class.new(default_options.merge(options)) }
before do before do
allow_any_instance_of(GitHubChangelogGenerator::OctoFetcher).to receive(:get_all_tags).and_return(all_tags) allow_any_instance_of(GitHubChangelogGenerator::OctoFetcher).to receive(:get_all_tags).and_return(all_tags)