---
src/features/deployment.feature | 3 ++-
src/features/step_definitions/deployment_steps.rb | 5 +++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index 56b5e68..7f72cc9 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -116,10 +116,11 @@ Feature: Manage Deployments
Scenario: View a deployment via XHR
And a deployment "mockdeployment" exists
+ And the deployment "mockdeployment" has an instance named
"myinstance"
And I request XHR
When I am viewing the deployment "mockdeployment"
Then I should get back a partial
- And I should see "mockdeployment"
+ And I should see "myinstance"
Scenario: Create a deployment and get JSON response
And I accept JSON
diff --git a/src/features/step_definitions/deployment_steps.rb
b/src/features/step_definitions/deployment_steps.rb
index 6384630..6383196 100644
--- a/src/features/step_definitions/deployment_steps.rb
+++ b/src/features/step_definitions/deployment_steps.rb
@@ -26,6 +26,11 @@ Given /^a deployment "([^"]*)" exists$/ do |arg1|
Factory(:deployment, :name => arg1) unless Deployment.find_by_name(arg1)
end
+Given /^the deployment "([^"]*)" has an instance named
"([^"]*)"$/ do |d_name, i_name|
+ deployment = Deployment.find_by_name(d_name)
+ deployment.instances << Factory(:instance, :name => i_name)
+end
+
When /^I am viewing the deployment "([^"]*)"$/ do |arg1|
visit deployment_url(Deployment.find_by_name(arg1))
end
--
1.7.4.4