diff --git a/README.md b/README.md index b1a7ce9..35bbf87 100644 --- a/README.md +++ b/README.md @@ -71,9 +71,6 @@ Feel free to check the [issues page](issues/). Give a ⭐️ if you like this project! -## Acknowledgments - -- [Thanks for Microverse][https://github.com/microverseinc] ## 📝 License diff --git a/spec/main_spec.rb b/spec/main_spec.rb index 0831f9b..2c74d1f 100644 --- a/spec/main_spec.rb +++ b/spec/main_spec.rb @@ -219,10 +219,7 @@ end it 'should return the longest word' do - longest = str_ary.inject do |memo, word| - memo.length > word.length ? memo : word - end - expect(longest).to eql('Sky-Light') + expect(str_ary.inject { |memo, word| memo.length > word.length ? memo : word }).to eql('Sky-Light') end it 'should return the longest wor' do @@ -234,7 +231,8 @@ end it 'should not mutate the original value' do - expect(number_ary.inject { |product, n| product * n }).to eql([5, 6, 7, 8, 9, 10]) + number_ary.my_inject { |product, n| product * n } + expect(number_ary).to eql([5, 6, 7, 8, 9, 10]) end end