Michael Deimels Blog

No comment

Codewars Katas

Sometimes I challenge my self and try one of the code katas from coderwars. I’ll try to finish it within one pomodoro means 25 minutes. The setup on my local machine looks like this:

  • go to my katas dir and create a new folder

  • inside the folder, i create one lib and one spec folder

  • add a README.md with the link to the kata

# Two old ages

  • add a Gemfile:
source 'http://rubygems.org'

gem "guard-rspec"
  • then init the project
bundle install
guard init
  • create a function class under lib/
class TwoOldAges
  def self.call(numbers)
  • and spec inside spec/
require_relative '../lib/two_old_ages'

RSpec.describe "TwoOldAges" do

  it "test something" do
    expect(TwoOldAges.call([1,5])).to eq([1,5])


  • start Guard with bundle exec guard

Hapy Hacking!!!