Last Updated: February 25, 2016
·
362
· yanhaoyang

code, tests and command line, all in one file

# main logic
def hi
  'hi'
end

# rspec tests
require 'rspec'
describe "hi" do

  it "says 'hi'" do
    hi.should == 'hi'
  end

end

# command line
if __FILE__ == $0
  puts hi
end