Commit 9e0ca98aeb2879e62e8c43677102f83f591f2258

Authored by Diego Camarinha
2 parents 8eed3368 a5fd190d

Merge branch 'missing_tests' into dev

Gemfile.lock
1 1 GIT
2 2 remote: https://github.com/mezuro/kalibro_entities.git
3   - revision: de2d51db42ddb77f3842eec2223c00b68a48222f
  3 + revision: c28d55fc1b02efc29eb5299b30da5d56f7d8c63f
4 4 specs:
5 5 kalibro_entities (0.0.1)
  6 + activesupport (~> 4.0.0)
6 7 savon (~> 2.3.0)
7 8  
8 9 GEM
... ...
features/project.feature 0 → 100644
... ... @@ -0,0 +1,44 @@
  1 +Feature: Project
  2 + In Order to have a good interaction with the website
  3 + As a regular user
  4 + I should see and manage projects
  5 +
  6 + Scenario: Listing projects
  7 + Given I am at the homepage
  8 + When I click the All Projects link
  9 + Then I should see Listing Projects
  10 + And I should see Name
  11 + And I should see Description
  12 +
  13 + # This will fail until do the authentication to project.
  14 + @wip
  15 + Scenario: Should not create project without login
  16 + Given I am at the All Projects page
  17 + Then I should not see New Project
  18 +
  19 + Scenario: Should list the existing projects
  20 + Given I am a regular user
  21 + And I am signed in
  22 + And I have a sample project
  23 + And I am at the All Projects page
  24 + Then the sample project should be there
  25 +
  26 + Scenario: Should show the existing project
  27 + Given I am a regular user
  28 + And I am signed in
  29 + And I have a sample project
  30 + And I am at the All Projects page
  31 + When I click the Show link
  32 + Then I should see Name
  33 + And I should see Description
  34 + And I should see Back
  35 + And the sample project should be there
  36 +
  37 + @wip
  38 + Scenario: Should back to the All Projects page from show project view
  39 + Given I am a regular user
  40 + And I am signed in
  41 + And I have a sample project
  42 + And I am at the Sample Project page
  43 + When I click the Back link
  44 + Then I should be in the All Projects page
... ...
features/step_definitions/project_steps.rb 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +Given(/^I am at the All Projects page$/) do
  2 + visit projects_path
  3 +end
  4 +
  5 +Given(/^I have a sample project$/) do
  6 + @project = FactoryGirl.create(:project)
  7 +end
  8 +
  9 +Given(/^I am at the Sample Project page$/) do
  10 + visit "#{projects_path}/#{@project.id}"
  11 +end
  12 +
  13 +Then(/^I should not see (.+)$/) do |text|
  14 + page.should_not have_content(text)
  15 +end
  16 +
  17 +Then(/^the sample project should be there$/) do
  18 + page.should have_content(@project.name)
  19 + page.should have_content(@project.description)
  20 +end
  21 +
  22 +Then(/^I should be in the All Projects page$/) do
  23 + page.should have_content("Listing Projects")
  24 +end
... ...