2. Why test?
Regression scenarios of stuff already developed
Modularity/Design
OO principles
Uncover different inputs/scenarios
Confidence to deploy to production
3. Types of Testing
1. Unit
2. Integration - 1
3. Integration - 2
4. Headless
5. Contract
6. Functional/UI
a. Smoke
b. Regression
6. Test Frameworks (in Ruby)
Unit test frameworks
minitest
http://docs.seattlerb.org/minitest/
rspec (also a BDD-style test framework) http://rspec.info/
Functional test frameworks
rspec http://rspec.info/
cucumber https://cucumber.io/
selenium http://docs.seleniumhq.org/
9. Stubs vs Mocks
Why do we need these?
Which is better?
Tools:
mocha http://gofreerange.com/mocha/docs/
rspec-mocks https://github.com/rspec/rspec-mocks
More reading: http://martinfowler.com/articles/mocksArentStubs.html
11. Some gists
Using locally-scoped constants during tests: https://gist.github.com/vraravam/877198
Rails generator using rspec and factory_girl:
https://gist.github.com/vraravam/15c2d465d040bcbab234