We use RSpec feature and specs heavily,
controller and view specs more judiciously,
FactoryBot for test data,
JavaScript integration specs with Poltergeist or Capybara Webkit,
like test doubles and test spies but not test mocks,
and we stub external requests with Webmock.
An example of making complicated code easier to test by using
the Builder, Decorator, Chain of Responsibility, and Null Object patterns
and recursion, object composition, and immutable objects.
We wanted an indicator, visible throughout our Boston office, that informs
whether a bathroom is available. We used the power of hardware to hack
together a solution.
Let’s take a deep dive in the Unix shell’s if statement.
We’ll cover syntax, negation, the test command, the [ command,
bracket-bracket, math and numerical comparisons,
and various rules for regular expressions.