Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I intentionally wrote the code this way, that it behave as it behave.
I think the test case "should return 2 for input 1" is wrong.
When limit is 1, 2 exceeds the limit, so it should not be taken into account.
Ok, the instruction says "Generate all of the Fibonacci numbers starting with 1 and 2 and ending on the highest number before exceeding the parameter's value", but this looks a bit like, change the instruction that it fits the code, I would expect:
Expect(SumEvenFibonacci(0)).To(Equal(0))
Expect(SumEvenFibonacci(1)).To(Equal(0))
Expect(SumEvenFibonacci(5)).To(Equal(2)) (interessting case, some of the codes here return 2, some 10)