Permalink
Browse files

Link to remove a project added

  • Loading branch information...
1 parent 7a27228 commit 97909e9286ddcb39bb2177304cf98617759b3538 @BrunoGrasselli BrunoGrasselli committed with Jul 25, 2010
View
1 app/views/shared/_project.haml
@@ -7,6 +7,7 @@
= yield
= link_to t(:edit), edit_project_path(project)
+= link_to t(:remove), project_path(project), :method => :delete, :confirm => t("are_you_sure")
= link_to t(:build), project_builds_path(project), :method => :post
= link_to t(:specs), specs_path(project.name) if project.has_file?("doc/specs.html")
= link_to t(:features), features_path(project.name) if project.has_file?("doc/features.html")
View
2 config/locales/en.yml
@@ -3,10 +3,12 @@
en:
ago: "ago"
+ are_you_sure: "Are you sure?"
build: "build"
edit: "edit"
deploy: "deploy"
features: "features"
metrics: "metrics"
new_project: "new project"
+ remove: "remove"
specs: "specs"
View
7 features/manage_project.feature
@@ -18,6 +18,13 @@ Feature: Manage projects
Then I should see /Bluepump/
And I should see /gitFake/
+ Scenario: Remove a project
+ Given I have a project with name "Test Project"
+ And I am on the project page
+ When I follow "remove"
+ Then I should be on the projects page
+ And I should not see "Test Project"
+
Scenario: Build project
Given I have a project
And I am on the project page
View
4 features/step_definitions/projects_steps.rb
@@ -2,6 +2,10 @@
@project = Project.create! :name => "whatever", :url => "fake", :email => "fake2"
end
+Given /^I have a project with name "([^"]*)"$/ do |arg1|
+ @project = Project.create! :name => name, :url => "fake", :email => "fake2"
+end
+
When /^I request '(.*)'$/ do |path|
visit path
end
View
2 features/support/paths.rb
@@ -10,6 +10,8 @@ def path_to(page_name)
when /the home\s?page/
'/'
+ when /the projects page/
+ projects_path
when /the new test page/
new_test_path
when /the new projects page/

0 comments on commit 97909e9

Please sign in to comment.