Alle Artikel mit dem Schlagwort: RSPEC

Time to have Dinnr

Schreibe einen Kommentar
Allgemein

I’m in my last of 12 weeks Makers Academy. It’s hard to believe and at the same time I’m okay with it. Maybe I’m spoiled by our smooth and rewarding final project but I feel ready for the market. I want to build apps that are actually used. But before I tell you about my plans (in another post) I will tell you about „Dinnr„. The idea was pitched to us by my friend Patrick Abele. […]

The Kindergarten-state-of-mind

Schreibe einen Kommentar
Code
Tom keeps focused.

„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 objects talk to each other. I thought I had understood that a proc wraps a method to have it executed […]

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

Schreibe einen Kommentar
Code

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 out. RSpec test: force the function return a specific value I implemented an if-statement in my landing- and take-off-procedures. So […]

TDD – My first major obstacle

Schreibe einen Kommentar
Code

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 works (non-technically spoken) In TDD developers at first break their problem down into objects and actions. In our first week’s […]