![]() | Error in Recipe 31 |
|
30 Aug 2012, 10:57
Wari Wahab (3 posts) |
This reports a false positive for all steps, except when you can’t launch the browser. If you login wrongly, titles will be []. If you login properly, titles is still []. Anyway, I’ve added the following changes to my test, but I don’t think this is how it should really be done. Got me going there though :)
diff --git a/features/step_definitions/bookshelf_steps.rb b/features/step_definitions/bookshelf_steps.
index 397df1f..4edffef 100644
--- a/features/step_definitions/bookshelf_steps.rb
+++ b/features/step_definitions/bookshelf_steps.rb
@@ -13,7 +13,8 @@ end
Then /^I should see a sorted list of purchased books$/ do
doc = Nokogiri::HTML browser.html
- titles = doc.css('table#bookshelf tr td.description h4').map &:text
+ titles = doc.css('table#bookshelf tr td.description p.title').map &:text
+ titles.should_not eq([])
titles.should == titles.sort_by(&:upcase)
end
|
|
31 Aug 2012, 05:23
Ian Dees (192 posts) |
Hi, Wari. Good catch; thank you! I’ve checked in an update; hopefully I made the cutoff for the next beta version coming in a few days. I used Sincerely, Ian |
| You must be logged in to comment |

