Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 45 lines (41 sloc) 1.878 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
Feature: Manage collaborators
Background:
Given an account "thoughtbot" with an api key of "deadbeef"

Scenario: Adding a single collaborator for a specific project
When I execute the following code
"""
Enforcer "thoughtbot", "deadbeef" do
project "shoulda", 'rmmt'
end
"""
Then the GitHub API should have received a request to add "rmmt" as a collaborator for "shoulda"

Scenario: Adding a single collaborator for more than one project
When I execute the following code
"""
Enforcer "thoughtbot", "deadbeef" do
project "shoulda", 'rmmt'
project "factory_girl", 'qrush'
end
"""
Then the GitHub API should have received a request to add "rmmt" as a collaborator for "shoulda"
Then the GitHub API should have received a request to add "qrush" as a collaborator for "factory_girl"

Scenario: Adding more than one collaborators for a specific project
When I execute the following code
"""
Enforcer "thoughtbot", "deadbeef" do
project "shoulda", 'rmmt', 'coreyhaines', 'qrush'
end
"""
Then the GitHub API should have received a request to add "rmmt" as a collaborator for "shoulda"
And the GitHub API should have received a request to add "coreyhaines" as a collaborator for "shoulda"
And the GitHub API should have received a request to add "qrush" as a collaborator for "shoulda"

Scenario: Removing one collaborator from the project
Given "qrush" is a collaborator for "shoulda"
When I execute the following code
"""
Enforcer "thoughtbot", "deadbeef" do
project "shoulda", 'coreyhaines'
end
"""
Then the GitHub API should have received a request to add "coreyhaines" as a collaborator for "shoulda"
And the GitHub API should have received a request to remove "qrush" as a collaborator for "shoulda"
Something went wrong with that request. Please try again.