How to configure your Rails engine with Rspec, Capybara, and FactoryGirl
1. Run the follow lines to generate a mountable engine
|
|
Tech && Learn && Fun
|
|
I used to think cucumber for Rails is a little bit over kill for the developer. Because every time you have to write a lot of regular expression to work it out. But in the recently project, we use Capybara and poltergeist with RSpec to solve this problem. It even can test your SPA and integrate with CI very nicely.
Poltergeist is a driver for Capybara. It allows you to run your Capybara tests on a headless WebKit browser, provided by PhantomJS. So, what is headless? That means you don’t need to fire up your browser. What’s that mean? Fast!!
brew install phantomjs
in Mac.