Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added an empty KanbansController * Added a functional test for KanbansController#index * Added some routing for cucumber * Added a cucumber feature for the menu
- Loading branch information
Showing
10 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
class KanbansController < ApplicationController | |||
unloadable | |||
def index | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
module KanbansHelper | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
<h2>Kanbans#index</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
Feature: Kanban Page | |||
As a user | |||
I want to see issues grouped according to Kanban | |||
So I know what to work on next | |||
|
|||
Scenario: Kanban top menu item | |||
Given I am logged in | |||
And I am on the Homepage | |||
|
|||
Then I should see a "top" menu item called "Kanban" | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,7 +1,26 @@ | |||
Before do | |||
Sham.reset | |||
end | |||
|
|||
Given /^there is a user$/ do | Given /^there is a user$/ do | ||
@user = User.make | @user = User.make | ||
end | end | ||
|
|
||
Given /^I am logged in$/ do | |||
@current_user = User.make | |||
User.stubs(:current).returns(@current_user) | |||
end | |||
|
|||
Given /^I am on the Homepage$/ do | |||
visit url_for(:controller => 'welcome') | |||
end | |||
|
|||
Then /^I should see a "top" menu item called "(.*)"$/ do |name| | |||
assert_select("div#top-menu") do | |||
assert_select("a", name) | |||
end | |||
end | |||
|
|||
Then /^there should be a user$/ do | Then /^there should be a user$/ do | ||
assert_equal 1, User.count(:conditions => {:login => @user.login}) | assert_equal 1, User.count(:conditions => {:login => @user.login}) | ||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
def path_to(page_name) | |||
case page_name | |||
|
|||
when /the homepage/i | |||
url_for(:controller => 'welcome') | |||
# Add more page name => path mappings here | |||
|
|||
else | |||
raise "Can't find mapping from \"#{page_name}\" to a path." | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,2 @@ | |||
# English strings go here | kanban_title: Kanban | ||
my_label: "My label" |
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
resource :kanban |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
require File.dirname(__FILE__) + '/../test_helper' | |||
|
|||
class KanbansControllerTest < ActionController::TestCase | |||
context "on GET to :index" do | |||
setup { get :index } | |||
|
|||
should_respond_with :success | |||
should_render_template :index | |||
should_not_set_the_flash | |||
end | |||
end |