Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
Updating the DSL in the features
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
coreyhaines authored and qrush committed Jul 13, 2009
1 parent 493248e commit 0860dbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions features/manage_collaborators.feature
Expand Up @@ -6,11 +6,11 @@ Feature: Manage collaborators
Scenario: Adding a single collaborator for a specific project
Given the following
"""
project :name => "shoulda" do |p|
p.collaborators << ['rmmt']
project "shoulda" do
collaborators 'rmmt'
end
"""
When I execute it
Then I should have made a request to add the collaborators
Then I should have made a request to add the collaborators to project "shoulda"
|name|
|rmmt|
6 changes: 3 additions & 3 deletions features/step_definitions/enforcer_steps.rb
@@ -1,5 +1,5 @@
Given /^we are capturing http requests$/ do
stub(GitHubApi).add_collaborator(anything)
stub(GitHubApi).add_collaborator(anything, anything)
end

Given /^the following$/ do |code|
Expand All @@ -11,9 +11,9 @@
enforcer.instance_eval(@code)
end

Then /^I should have made a request to add the collaborators$/ do |table|
Then /^I should have made a request to add the collaborators to project "(.*)"$/ do |project_name, table|
table.hashes.each do |collaborator|
assert_received(GitHubApi) { |subject| subject.add_collaborator(collaborator[:name]) }
assert_received(GitHubApi) { |subject| subject.add_collaborator(project_name, collaborator[:name]) }
end
end

0 comments on commit 0860dbe

Please sign in to comment.