Apply automatic rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 10:51:44 +02:00
parent fe4000916c
commit 6cbecb5b39
440 changed files with 2705 additions and 1853 deletions

View File

@@ -1,2 +1,3 @@
def fibonacci(n)
end
# frozen_string_literal: true
def fibonacci(n); end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require './exercise'
describe '#fibonacci' do

View File

@@ -1,9 +1,11 @@
# frozen_string_literal: true
require './exercise'
describe '#fibonacci' do
it 'works recursively' do
@n = 16
expect(self).to receive(:fibonacci).and_call_original.at_least(@n ** 2).times
expect(self).to receive(:fibonacci).and_call_original.at_least(@n**2).times
fibonacci(@n)
end
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require './exercise'
require './reference'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Reference
def fibonacci(n)
n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2)