Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix feature specs to align with #89 #94

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions features/git-mob/bugs/41-gitmessage-accumulates-authors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@ Feature: 🐛 gitmessage accumulates authors over time
Scenario: starting update ~/.gitmessage but does not configure commit.template
Given I cd to "example"
And I run `git mob ad`
And the file "~/.gitmessage" should contain:
"""

Co-authored-by: Amy Doe <amy@findmypast.com>
"""
And the file "~/.gitmessage" should not contain "Co-authored-by"
When I successfully run `git mob bd`
Then the file "~/.gitmessage" should contain:
"""

Co-authored-by: Bob Doe <bob@findmypast.com>
"""
And the file "~/.gitmessage" should not contain:
"""

Co-authored-by: Amy Doe <amy@findmypast.com>
"""
And the file "~/.gitmessage" should not contain "Co-authored-by"
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ Feature: 🐛 co-authors not cleared from message template when returning to git

Scenario:
Given I successfully run `git mob ad`
And the file "~/.gitmessage" should contain:
"""

Co-authored-by: Amy Doe <amy@findmypast.com>
"""
And the file "~/.gitmessage" should not contain "Co-authored-by"
When I successfully run `git solo`
And the file "~/.gitmessage" should not contain "Co-authored-by"
6 changes: 1 addition & 5 deletions features/git-mob/message.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ Feature: message
Jane Doe <jane@example.com>
Amy Doe <amy@findmypast.com>
"""
And the file "~/.gitmessage" should contain:
"""

Co-authored-by: Amy Doe <amy@findmypast.com>
"""
And the file "~/.gitmessage" should not contain "Co-authored-by:"
And the file ".git/config" should not contain:
"""
template = ~/.gitmessage
Expand Down
30 changes: 5 additions & 25 deletions features/git-mob/parity/git-mob.feature
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,9 @@ Feature: git-mob.spec
Jane Doe <jane@example.com>
Bob Doe <bob@example.com>
"""
And a file named "~/.gitmessage" should contain:
"""
A commit title

A commit body that goes into more detail.
And a file named "~/.gitmessage" should not contain "Co-authored-by:"

Co-authored-by: Bob Doe <bob@example.com>
"""

Scenario: appends co-authors to an existing commit template
Scenario: does not append co-authors to an existing commit template
Given a simple git repo at "example"
And I cd to "example"
And a file named "~/.gitmessage" with:
Expand All @@ -151,27 +144,14 @@ Feature: git-mob.spec
A commit body that goes into more detail.
"""
When I successfully run `git mob ad bd`
And a file named "~/.gitmessage" should contain:
"""
A commit title
And a file named "~/.gitmessage" should not contain "Co-authored-by:"

A commit body that goes into more detail.

Co-authored-by: Amy Doe <amy@example.com>
Co-authored-by: Bob Doe <bob@example.com>
"""

Scenario: appends co-authors to a new commit template
Scenario: does not append co-authors to a new commit template
Given a simple git repo at "example"
And I cd to "example"
And a file named "~/.gitmessage" does not exist
When I successfully run `git mob ad bd`
And a file named "~/.gitmessage" should contain:
"""

Co-authored-by: Amy Doe <amy@example.com>
Co-authored-by: Bob Doe <bob@example.com>
"""
And a file named "~/.gitmessage" should not exist

@pending
# allow running some mob commands outside a working tree
Expand Down