This commit is contained in:
Petr Korolev 2016-07-21 17:26:53 +03:00
parent 939f6fd768
commit 37a7430d81

View File

@ -62,4 +62,19 @@ describe GitHubChangelogGenerator::Parser do
it { is_expected.to match_array([nil, nil]) } it { is_expected.to match_array([nil, nil]) }
end end
end end
describe ".fetch_user_and_project" do
before :each do
ARGV = ["https://github.com/skywinder/github-changelog-generator"]
end
context do
let(:valid_user) { "initialized_user" }
let(:options) { { user: valid_user } }
let(:options_before_change) { options.dup }
it "should leave user unchanged" do
expect { GitHubChangelogGenerator::Parser.fetch_user_and_project(options) }.to change { options }
.from(options_before_change)
.to(options_before_change.merge(project: "github-changelog-generator"))
end
end
end
end end