Created
          May 30, 2012 04:58 
        
      - 
      
- 
        Save alisterscott/2833841 to your computer and use it in GitHub Desktop. 
    Example of way to get rid of page instance variables from step defs
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | #https://github.com/natritmeyer/site_prism#epilogue | |
| # was | |
| @home = Home.new | |
| @home.load | |
| @home.search_field.set "Sausages" | |
| @home.search_field.search_button.click | |
| @results_page = SearchResults.new | |
| @results_page.should have_search_result_items | |
| # could be | |
| visit_page Home do |page| | |
| page.search_field.set "Sausages" | |
| page.search_button.click | |
| end | |
| on_page(SearchResults).should have_search_result_items | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment