Skip to content

Instantly share code, notes, and snippets.

@sanaumair
Created March 28, 2012 08:42
Show Gist options
  • Save sanaumair/2224791 to your computer and use it in GitHub Desktop.
Save sanaumair/2224791 to your computer and use it in GitHub Desktop.
this line is assert items.size > 10 is false
1) Failure:
test: Top adverts should be shown on first page. (ResultItemsControllerTest)
[test/integration/result_items_test.rb:175:in `__bind_1332923889_480750'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `call'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `test: Top adverts should be shown on first page. '
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `run'
activesupport (3.1.3) lib/active_support/callbacks.rb:408:in `_run_setup_callbacks'
activesupport (3.1.3) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.1.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:65:in `run']:
<false> is not true.
context 'Top adverts' do
should 'be shown on first page' do
do_search :keywords => "quicksilver", :item_type => "all"
items = page.all('section.result')
# Showing the top adverts increases the items count above the standard 10
assert items.size > 10
assert_equal 'Quicksilver - 700 Weekend', items.first.find('h2 a').text
end
should 'be hidden on next pages' do
do_search :keywords => "quicksilver", :item_type => "all"
page.find('.pagination .next a').click
items = page.all('section.result')
assert_equal 10, items.size
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment