The Kindergarten-state-of-mind

My Colleague Tom in one of our last talks. You really have to bring a fresh and positive mind if you want to grasp what's going on here.

„Don’t worry about feeling stupid.“ They keep telling you this at Makers Academy. „You will get used to not knowing how things work,“ is another piece of advice I have heard several times. But I do worry that I’m too stupid to get my head around this. I thought I knew how to make my… The Kindergarten-state-of-mind weiterlesen

RSpec: How to stub a random variable (make the weather as you need it to be)

Will it rain, or not? How to stub a method in Spec tests.

In our last challenge there was an airport that gave or declined landing permission for planes based on the weather. There was no real weather forecast, I just generated a random weather: def generate_weather [:sunny, :sunny, :sunny, :stormy].shuffle.first end The Ruby-method .shuffle randomly mixes the values within the array and .first than takes the first value… RSpec: How to stub a random variable (make the weather as you need it to be) weiterlesen

Veröffentlicht am
Kategorisiert in Code Verschlagwortet mit , ,

TDD – My first major obstacle

For someone like me, new to development, it sounds really strange to write a test before having a function or product ready. But anybody at Makers Academy is a 100% convinced that the so called technique of “Test Driven Development” (TDD) is absolutely essential for writing good, maintainable code. What it is and how it… TDD – My first major obstacle weiterlesen