added specs for the new octo_fetcher. Also had to refactor a bit to deal with hashes and arrays instead of objects

This commit is contained in:
Andrew Waage
2016-05-19 23:46:13 -07:00
committed by Olle Jonsson
parent 8277aa4319
commit 2347cc4220
25 changed files with 345 additions and 36 deletions

View File

@@ -2,10 +2,10 @@
module GitHubChangelogGenerator
describe Generator do
context "#exclude_issues_by_labels" do
let(:label) { double("the-bad-label", name: "BAD") }
let(:issue) { double("the-issue-to-be-excluded", labels: [label]) }
let(:good_label) { double("a-good-label", name: "GOOD") }
let(:good_issue) { double("an-issue-to-be-kept", labels: [good_label]) }
let(:label) { { 'name' => "BAD" } }
let(:issue) { { 'labels' => [label] } }
let(:good_label) { { 'name' => "GOOD" } }
let(:good_issue) { { 'labels' => [good_label] } }
let(:issues) { [issue, good_issue] }
subject(:generator) { described_class.new(exclude_labels: %w(BAD BOO)) }