Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 519 Bytes

File metadata and controls

24 lines (20 loc) · 519 Bytes

Test-Driven Development

  • Write test first.
  • Correct the test so it passes. (Going Green)
  • Refactor.

Differences Between "Let" and "Each" Matchers:

  • Each creates a unique instance variable for each "it" unit test. Proper syntax is:
		before :each do
			@variable_name = ClassName.new
		end
  • Let passes the same instance variable to all "it" unit tests. Proper syntax is:
		before :variable_name do
			ClassName.new
		end