Example code from Day 1.
A few different types of tests are included here, as examples.
- A specification for a simple ruby class
- A specificaiton for a simple web page
- A specificaiton for a popular web service
- A specificaiton for a newly-created Rails app
Try getting the tests passing with your own code!
Hints:
- spec_helper.rb will set you up with MiniSpec.
- Use the serve.rb script to easily get local html content browser-accessible.
- You'll need more than 1 local webserver running to pass all specs.
Have fun!
© Code Fellows, 2013
Test output:
Run options: --seed 32703
....
Finished tests in 1.613040s, 2.4798 tests/s, 6.1995 assertions/s.
4 tests, 10 assertions, 0 failures, 0 errors, 0 skips