Skip to content

Commit

Permalink
test: add exclamation mark unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
xotahal committed Nov 26, 2019
1 parent 851145b commit 5ad5022
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/analyze_commits_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ def execute_lane_test
expect(Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::RELEASE_NEXT_VERSION]).to eq("2.0.0")
end

it "should increment major change and return true" do
commits = [
"docs: ...|",
"feat: ...|",
"fix!: ...|BREAKING CHANGE: Bump major version"
]
allow(Fastlane::Actions::AnalyzeCommitsAction).to receive(:get_last_tag).and_return('v1.0.8-1-g71ce4d8')
allow(Fastlane::Actions::AnalyzeCommitsAction).to receive(:get_commits_from_hash).and_return(commits)

expect(execute_lane_test).to eq(true)
expect(Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::RELEASE_NEXT_VERSION]).to eq("2.0.0")
end

it "should correctly parse scopes" do
commits = [
"docs(scope): ...|",
Expand Down

0 comments on commit 5ad5022

Please sign in to comment.