add test case
This commit is contained in:
parent
8906fe5022
commit
9f1537ab34
|
@ -77,4 +77,18 @@ describe GitHubChangelogGenerator::Generator do
|
|||
it { is_expected.to match_array(tags_mash_from_strings(%w(1 2))) }
|
||||
end
|
||||
end
|
||||
|
||||
describe "#get_time_of_tag" do
|
||||
before(:all) do
|
||||
@generator = GitHubChangelogGenerator::Generator.new
|
||||
puts "blah"
|
||||
end
|
||||
it "should raise ChangelogGeneratorError" do
|
||||
expect { @generator.get_time_of_tag nil }.to raise_error(GitHubChangelogGenerator::ChangelogGeneratorError)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#sort_tags_by_date" do
|
||||
subject { generator.sort_tags_by_date }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
describe GitHubChangelogGenerator::Parser do
|
||||
describe ".user_project_from_remote" do
|
||||
context "when remote is 1" do
|
||||
context "when remote is type 1" do
|
||||
subject { GitHubChangelogGenerator::Parser.user_project_from_remote("origin https://github.com/skywinder/ActionSheetPicker-3.0 (fetch)") }
|
||||
it { is_expected.to be_a(Array) }
|
||||
it { is_expected.to match_array(["skywinder", "ActionSheetPicker-3.0"]) }
|
||||
end
|
||||
context "when remote is 2" do
|
||||
context "when remote is type 2" do
|
||||
subject { GitHubChangelogGenerator::Parser.user_project_from_remote("https://github.com/skywinder/ActionSheetPicker-3.0") }
|
||||
it { is_expected.to be_a(Array) }
|
||||
it { is_expected.to match_array(["skywinder", "ActionSheetPicker-3.0"]) }
|
||||
end
|
||||
context "when remote is 3" do
|
||||
context "when remote is type 3" do
|
||||
subject { GitHubChangelogGenerator::Parser.user_project_from_remote("https://github.com/skywinder/ActionSheetPicker-3.0") }
|
||||
it { is_expected.to be_a(Array) }
|
||||
it { is_expected.to match_array(["skywinder", "ActionSheetPicker-3.0"]) }
|
||||
end
|
||||
context "when remote is 4" do
|
||||
context "when remote is type 4" do
|
||||
subject { GitHubChangelogGenerator::Parser.user_project_from_remote("origin git@github.com:skywinder/ActionSheetPicker-3.0.git (fetch)") }
|
||||
it { is_expected.to be_a(Array) }
|
||||
it { is_expected.to match_array(["skywinder", "ActionSheetPicker-3.0"]) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user