https://www.udemy.com/course/testing-ruby-with-rspec/
gem install rspec
- card
- context
- before after
- nested hook
- overwriting let
- implicit subject
- explicit subject
- described class
- one liner syntax
- shared examples
- shared context
- not_to
- equality: eq, eql, equal, be
- comparison matchers
- predicate matches
- all matchers
- be matcher(truthy, falsy, nil)
- change matcher
- contain exactly (ignore order)
- start_with, end_with
- have_attribute
- include (substr, arr elt, keys, key-val)
- raise error
- respond to (check if class has method & #args)
- satisfy: custom predicate function
- not_to_spec
- compound expectations
- double()
- movie
- allow(double_or_real_obj).to receive(:method_name).with(matching_arg).and_return(a, b, c)
- matching arguments
- instance double (only can mock real methods)
- class double
- spies I (vs double)