A Little RSpec
23
Jano González Developer A Little RSpec
-
Upload
jano-gonzalez -
Category
Technology
-
view
1.681 -
download
3
Transcript of A Little RSpec
Jano GonzálezDeveloper
A Little RSpec
code:https://github.com/janogonzalez/a-little-rspec
From testing to describing code
Describing Code
Describing Code
Describing Code
• describe: The thing to describe
• it: The expected behavior
• should/should_not: The assertion
DRYing
DRYing
DRYing
• before: Preparing the test case
• after: Clean up
• around: Mix before & after
A little more context
A little more context
A little more context
• context
More DRYing
More DRYing
More DRYing
• let
• let!
More DRYing
More DRYing
• implicit subject
More DRYing
More DRYing
• implicit subject
• it
• its
More DRYing
More DRYing
• explicit subject
More info
More info
• @dchelimsky
• The RSpec Book
• @janogonzalez ;)
• http://gemaroja.com ;)