05/12/19 · The describe and it methods come from rspeccore The Order, LineItem, Item and Money classes would be from your code The last line of the example expresses an expected outcome If ordertotal == Moneynew(555, USD), then the example passesIf not, it fails with a message like expected # got #02/12/19 · RSpec is a behaviordriven development (BDD) testing tool for Ruby, and is widely used for testing both plain ol' Ruby and fullon Rails applications I'm writing this as an intro to some basic patterns and syntax used in RSpec Rails testing, as well as some basic BDD strategy for breaking down code into testable unitsRspecexpecations provides a number of useful Matchers we use to compose expectations A Matcher is any object that responds to the following methods Rspec 3 The New The Old The Good Raise error ruby rspec