Skip to content

Commit

Permalink
more detailed spec
Browse files Browse the repository at this point in the history
  • Loading branch information
eleather committed Oct 28, 2011
1 parent 36dcc63 commit 64a3bcf
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions spec/requests/projects/show_spec.rb
Expand Up @@ -8,36 +8,51 @@
visit project_path(@project) visit project_path(@project)
end end



### Correctly Display Project Attributes ###

it 'should render the correct record attributes' do it 'should render the correct record attributes' do
page.should have_content(@project.name) page.should have_content(@project.name)
page.should have_content(@project.slug) page.should have_content(@project.slug)
page.should have_content(@project.description) page.should have_content(@project.description)
page.should have_link(@project.organization.name, :href => organization_path(@project.organization)) page.should have_link(@project.organization.name, :href => organization_path(@project.organization))
end end



describe 'in #radials section'
### Dashboard Aspects ### it 'should display recent question responses aggregated by radial'

it 'should have a link to a page giving more information about the radials for this project'
it 'should display recent question responses aggregated by radial' it 'should have a link to a view showing the trends of question responses aggregated by radial over time'
it 'should display the 8 most recent suggestions for this project'

describe 'when the user has recently answered no questions for this project' do
it 'should display all questions for the user to answer'
end end


describe 'when the user has recently answered only some questions for this project' do describe 'in #suggestions section'
it 'should display only unanswered questions for the user to answer' describe 'when this project has no suggestions'
it 'should display the new suggestion box at the top of the section'
it 'should have no other content'
end

describe 'when this project has less than 8 suggestions'
it 'should display the new suggestion box at the top of the section'
it 'should display all suggestions for this project, in most-voted order'
end

describe 'when this project has more than 8 suggestions'
it 'should display the new suggestion box at the top of the section'
it 'should display the 8 most recent suggestions for this project, in most-voted order'
end
end end


describe 'when the user has recently answered all questions for this project' do describe 'in #questions section'
it 'should display text telling the user that they\'ve answered all the questions for now' describe 'when this project has no questions' do
end it 'should display text telling the user that there are no questions for this project'
end


describe 'when the user has recently answered no questions for this project' do
it 'should display all questions for the user to answer'
end


### Links to Other Views ### describe 'when the user has recently answered only some questions for this project' do
it 'should display only unanswered questions for the user to answer'
end


it 'should have a link to a view showing the trends of question responses aggregated by radial over time' describe 'when the user has recently answered all questions for this project' do
it 'should display text telling the user that they\'ve answered all the questions for now'
end
end
end end

0 comments on commit 64a3bcf

Please sign in to comment.