thoughtbot / testing-rails

Source code for the Testing Rails book
Other
279 stars 49 forks source link

Add section on levels of abstraction #46

Closed JoelQ closed 9 years ago

JoelQ commented 9 years ago

This section covers why we'd want a single level of abstraction as well as the two most common ways to achieve this in feature specs:

  1. Extract Method
  2. Page Objects

I pulled heavily from these two blog posts:

  1. https://robots.thoughtbot.com/acceptance-tests-at-a-single-level-of-abstraction
  2. https://robots.thoughtbot.com/better-acceptance-tests-with-page-objects
jsteiner commented 9 years ago

One more comment. Otherwise :+1:

JoelQ commented 9 years ago

I'm going to merge this. @andyw8 Feel free to open a new PR or an issue if you'd like to continue the conversation on the interface of a page object.