diff --git a/Gemfile.lock b/Gemfile.lock index f930c96..a50bb75 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,9 @@ GIT remote: https://github.com/mezuro/kalibro_entities.git - revision: de2d51db42ddb77f3842eec2223c00b68a48222f + revision: c28d55fc1b02efc29eb5299b30da5d56f7d8c63f specs: kalibro_entities (0.0.1) + activesupport (~> 4.0.0) savon (~> 2.3.0) GEM @@ -68,7 +69,7 @@ GEM cucumber (>= 1.1.8) nokogiri (>= 1.5.0) database_cleaner (1.1.1) - devise (3.0.2) + devise (3.0.3) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) @@ -187,7 +188,7 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) - sqlite3 (1.3.7) + sqlite3 (1.3.8) therubyracer (0.11.4) libv8 (~> 3.11.8.12) ref diff --git a/features/project.feature b/features/project.feature index 342058f..9d0209d 100644 --- a/features/project.feature +++ b/features/project.feature @@ -10,6 +10,35 @@ Feature: Project And I should see Name And I should see Description + # This will fail until do the authentication to project. + @wip Scenario: Should not create project without login Given I am at the All Projects page - Then I should not see New Project \ No newline at end of file + Then I should not see New Project + + Scenario: Should list the existing projects + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + Then the sample project should be there + + Scenario: Should show the existing project + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the All Projects page + When I click the Show link + Then I should see Name + And I should see Description + And I should see Back + And the sample project should be there + + @wip + Scenario: Should back to the All Projects page from show project view + Given I am a regular user + And I am signed in + And I have a sample project + And I am at the Sample Project page + When I click the Back link + Then I should be in the All Projects page diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb index 0f62740..9147d5c 100644 --- a/features/step_definitions/project_steps.rb +++ b/features/step_definitions/project_steps.rb @@ -2,6 +2,23 @@ Given(/^I am at the All Projects page$/) do visit projects_path end +Given(/^I have a sample project$/) do + @project = FactoryGirl.create(:project) +end + +Given(/^I am at the Sample Project page$/) do + visit "#{projects_path}/#{@project.id}" +end + Then(/^I should not see (.+)$/) do |text| page.should_not have_content(text) -end \ No newline at end of file +end + +Then(/^the sample project should be there$/) do + page.should have_content(@project.name) + page.should have_content(@project.description) +end + +Then(/^I should be in the All Projects page$/) do + page.should have_content("Listing Projects") +end -- libgit2 0.21.2