Testing with Spec
require "spec"
require "./spec_helper"
describe "demo test" do
it "some free text here" do
result = 23 + 19 # this might be calling the real application
result.should eq 42
end
end
def add(x, y)
return x*y
end
describe "test cases" do
it "good" do
add(2, 2).should eq 4
end
pending "add" do
add(2, 3).should eq 5
end
pending "add" do
add(2, 4).should eq 6
end
end
crystal spec