What We Just Learned

Cucumber-Rails integrates Cucumber with Rails.

  • We installed Cucumber-Rails in our Rails project by running the cucumber:install generator. This created several files that wire up Cucumber to run scenarios against our Rails application.

  • We wrote a feature about displaying data without creating any user interface to enter it. Being able to prioritize features this way makes us flexible—we are not dictated by a strict implementation order.

  • We saw how we can use FactoryGirl to populate our database in Given steps.

  • We saw how we can access our web interface using Capybara’s visit method.

Now that you have learned how to set up Cucumber in a Rails application, it’s time to learn more about the full workflow. In the next chapter, you’ll learn more as we add Ajax behavior to Squeaker.

Try This

We never fired up our browser to see whether our Squeaker application actually works. Try to insert some sample users and messages in your development database using the Rails console. Or better yet, implement a feature for entering messages through the user interface, driven by Cucumber.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.2.240