You have a minimum viable product or high fidelity prototype. Your venture is lucky enough to get an interest from first customers. The problem is that your software product lacks the main feature – stability. This might spoil the opportunity.
11. Shoulda - update Gemfile
group :test do
gem 'shoulda-matchers', require: false
end
Run
$ bundle install --without production
12. Shoulda - update rails_helper
● in spec/rails_helper.rb
● after
require 'rspec/rails'
● add
require 'shoulda/matchers'
13. FactoryGirl - setting up test objects
● All instructions
https://github.com/thoughtbot/factory_girl
14. FactoryGirl - update Gemfile
group :test do
gem 'factory_girl'
end
Run
$ bundle install --without production
15. FactoryGirl - update Gemfile
group :test do
gem 'factory_girl'
end
Run
$ bundle install --without production
16. Generate test files for existing model
Run (replace Post with your existing model)
$ rails generate model Post -s
See generated spec and factory files
22. Capybara-webkit - testing javascript
● All instructions
o https://github.com/thoughtbot/capybara-webkit
o https://github.com/leonid-shevtsov/headless
23. Capybara-webkit - update Gemfile
group :test do
gem 'capybara-webkit', '~> 1.3.0'
gem 'headless'
end
Run
$ sudo apt-get install xvfb
$ bundle install --without production
24. Cucumber - update env.rb
Add to features/support/env.rb
Capybara.app = Rack::ShowExceptions.new(Rails.application)
# use webkit driver for javascript testing
Capybara.javascript_driver = :webkit
if Capybara.javascript_driver == :webkit
require 'headless'
headless = Headless.new
headless.start
end