Skip to content

Instantly share code, notes, and snippets.

defmodule Geom do
def area(width, length) do
width * length
end
end
@DWSimmons
DWSimmons / hello_world_test.rb
Created May 27, 2015 22:17
Exercism ruby hello world test
require 'minitest/autorun'
begin
require_relative 'hello_world'
rescue LoadError => e
puts "\n\n#{e.backtrace.first} #{e.message}"
puts DATA.read
exit 1
end
class HelloWorldTest < Minitest::Test
@DWSimmons
DWSimmons / hello_world.rb
Created May 27, 2015 22:14
I am n00b, here me fail!
class HelloWorld
def initialize(name = "World")
@name = name
end
def hello
puts "Hello #{@name}!"
end
end