Skip to content

Instantly share code, notes, and snippets.

@filipesperandio
Created September 14, 2022 16:43
Show Gist options
  • Save filipesperandio/c62b378c037dbe12af8cc076e6064fd5 to your computer and use it in GitHub Desktop.
Save filipesperandio/c62b378c037dbe12af8cc076e6064fd5 to your computer and use it in GitHub Desktop.
# Input: 'foo "foo bar" bar foobar'
# Output: ["foo", "foo bar", "bar", "foobar"]
# Input 'foo "foo bar baz" bar "foobar" "foo bar bar"'
# Output: ["foo", "foo bar baz", "bar", "foobar", "foo bar bar"]
def parse(txt)
end
# puts(parse("123"))
require 'rspec/autorun'
describe 'parse' do
it "splits strings containing blank spaces" do
expect(parse("two words")).to eq(["two", "words"])
expect(parse("three words somethingelse")).to eq(["three", "words", "somethingelse"])
end
end
## Topics
# Automate the implementation loop
# Red/Green/Refactor
# The cycle VS Test First
# Expect the failure
# The Unexpected failure
# "Red phobic"
# Baby steps
# Triangulation: Specific/Generic
# Test environments
# - Unit
# - UI
# Speed
## What is hard?
# - Test setup
# - Dependencies
# - Test is a mirror of the implementation
## References
# - https://www.amazon.com/Test-Driven-Development-Kent-Beck-ebook-dp-B095SQ9WP4/dp/B095SQ9WP4
# - https://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html
# - https://youtu.be/RAxiiRPHS9k
# - https://www.geepawhill.org/2021/10/26/mmmss-a-closer-look-at-steps/
# TDD Chat part1: https://drive.google.com/file/d/11UG9iz036MvEybRZdbRcKWezosg8NyhI/view?usp=sharing
# TDD Chat part2: https://drive.google.com/file/d/11bnnkY32eps7RPwns7ELLZCCul-FhNFJ/view?usp=sharing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment