Last active
January 3, 2016 05:09
-
-
Save hzm-s/8414176 to your computer and use it in GitHub Desktop.
簡易的な一覧画面のレコード表示のテスト(RSpec,Rails)
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
before do | |
@resources = FactoryGirl.create_list(:resource, 10) | |
end | |
it 'それぞれのResourceが表示されていること' do | |
visit '/resources' | |
@resources.each do |r| | |
expect(page).to have_content(/#{r.id}\s+#{r.attr1}\s+#{r.attr2}\s+#{r.attr3}/) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment