Created
April 8, 2013 09:50
-
-
Save maasha/5335637 to your computer and use it in GitHub Desktop.
1) Scaffold pages index pagination Failure/Error: it { should have_selector('div.pagination') } # FIXME expected css "div.pagination" to return something # ./spec/requests/scaffold_pages_spec.rb:27:in `block (4 levels) in <top (required)>'
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
require 'spec_helper' | |
describe "Scaffold pages" do | |
subject { page } | |
describe "index" do | |
let(:user) { FactoryGirl.create(:user) } | |
before do | |
sign_in user | |
30.times { FactoryGirl.create(:scaffold, user: user) } | |
visit user_scaffolds_path(user) | |
end | |
it { should have_selector('title', text: 'All scaffolds') } | |
it { should have_selector('h1', text: 'All scaffolds') } | |
it "should list each scaffold" do | |
user.scaffolds.each do |scaffold| | |
page.should have_selector('li', text: scaffold.name) | |
end | |
end | |
describe "pagination" do | |
it { should have_selector('div.pagination') } # FIXME | |
it "should list each scaffold" do | |
user.scaffolds.paginate(page: 1).each do |scaffold| | |
page.should have_selector('li', text: scaffold.name) | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment