Skip to content

Instantly share code, notes, and snippets.

@igrigorik
Created October 30, 2011 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save igrigorik/1325531 to your computer and use it in GitHub Desktop.
Save igrigorik/1325531 to your computer and use it in GitHub Desktop.
test.mirah
Parsing...
test.mirah
Inferring types...
Inference Error:
Cannot find instance method should(java.lang.String, block) on Test$__xform_tmp_2
test.mirah:20: Cannot find instance method should(java.lang.String, block) on Test$__xform_tmp_2
should "do stuff" do
^^^^^^^^^^^^^^^^^^^^^^^
assert false
^^^^^^^^^^^^^^^^^
end
^^^^^
def assert(test:boolean, msg:string)
msg ||= "Failed assertion, no message given."
if not test
raise Exception, msg
end
true
end
def should(desc:string, block:Runnable)
puts "should: #{desc}"
block.run
end
def describe(desc:string, block:Runnable)
puts "describe: #{desc}"
block.run
end
describe "spec thing" do
should "do stuff" do
assert false
end
end
puts "Hai"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment