Red Green Refactor
Today we watched an excellent video tutorial by PeepCode to learn more about RSpec. It covered:
- Learning the basic concept of the RSpec testing framework
- Learning the syntax of RSpec
- Using Rspec in isolation with a basic Ruby project
- Understanding the describe and it methods
Some key RSpec syntax:
expect(thing).to eq 'result'
And also:
- Understanding the red/green cycle of development
- Implementing the first feature of the application
- Creating a client and giving it a URL
- Using an HTTP Client app to see what a URL returns when sent a request
- Fetching an XML feed
- Parsing the XML of the comments feed
- Using the let method to simplify setup
- Using nested describe blocks
- Organising application code
- Debugging and fixing errors in RSpec code
- Parsing extra fields
- Working with unexpected Unicode input
- Using trivial examples to catch errors and expose assumptions
You can look at the code on GitHub.
Then we started working on Part 2 of the PeepCode tutorial, which we’ll finish tomorrow.
Oh yeah, we had a yummy lunch at Co.Up with Matt and Urs (and Nabil, Andy, and Hannah)…
…and @bumbledeebee left us a gift!