Skip to content

Commit

Permalink
Added Scenario for for using a layout without a side bar when viewing…
Browse files Browse the repository at this point in the history
… the new project action
  • Loading branch information
baphled committed Jun 18, 2010
1 parent 913a167 commit 21ab782
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions features/plain/layout_rendering.feature.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Feature: We want to us different layout for specific types of actions and areas
In order to help inform the user that specific actions have different layouts associated to them
As an user
I want to see different layouts for specific actions and areas

Scenario: Viewing the all forms should display te no sidebar layout
When I view the "projects" "new"
Then the view should not have a sidebar

Scenario: A project index view should have a sidebar
When I view the "projects" "index"
Then the view should have a sidebar
7 changes: 7 additions & 0 deletions features/step_definitions/layout_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
When /^I view the "([^\"]*)" "([^\"]*)"$/ do |model, action|
visit "/#{model}/#{action}"
end

Then /^the view should not have a sidebar$/ do
response.should_not have_selector :div, attribute = {:id => 'sidebar'}
end

0 comments on commit 21ab782

Please sign in to comment.