Capybara cheatsheet
https://gist.github.com/tomas-stefano/6652111
https://gist.github.com/steveclarke/2353100
Generators may still not be configured after having run rails g rspec:install
(project generated with the -T
flag?)
To activate them:
# Put in a config/initializers file config.generators do |g| g.test_framework :rspec, fixture: true, views: false g.integration_tool :rspec, fixture: true, views: false g.fixture_replacement :factory_girl, dir: 'spec/factories' end
Peak at the generators from the console with Rails.application.config.generators
API for Rails generators
expect(some_time).to be_within(1.second).of(some_other_time)