Created
October 30, 2011 05:11
-
-
Save igrigorik/1325531 to your computer and use it in GitHub Desktop.
test.mirah
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
^^^^^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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