Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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