This file contains 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
(print "poop") |
This file contains 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
context RackApp do | |
get "/" { response.status }.equals(200) | |
get "/home" { response.body }.matches(/html/) | |
end |
This file contains 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
context RackApp do | |
get "/" do | |
asserts("okay") { response.status }.equals(200) | |
asserts("is html") { response.content_type }.equals("text/html") | |
end | |
end |
This file contains 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
An equals assertion macro | |
+ asserts pass | |
That is failing | |
+ reports failure |
This file contains 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
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" /> | |
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTIxMzUwMjYyNjRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRVjdGwwMCRCb2R5JFJlbWVtYmVyTWWyrWW8ZG7N5cuVqJmx5SoQDnCvVg==" /> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var theForm = document.forms['aspnetForm']; | |
if (!theForm) { | |
theForm = document.aspnetForm; | |
} |
This file contains 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
./test/../lib/riot/runnable.rb:37:in `run': undefined local variable or method `block' for #<Riot::Assertion:0x2c7f7c0> (NameError) | |
from ./test/../lib/riot/context.rb:28:in `run' | |
from ./test/../lib/riot/context.rb:27:in `each' | |
from ./test/../lib/riot/context.rb:27:in `run' | |
from ./test/../lib/riot/context.rb:30:in `run' | |
from ./test/../lib/riot/context.rb:30:in `each' | |
from ./test/../lib/riot/context.rb:30:in `run' | |
from ./test/../lib/riot.rb:17:in `run' | |
from ./test/../lib/riot.rb:17:in `each' | |
from ./test/../lib/riot.rb:17:in `run' |
This file contains 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
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': ./test/../lib/riot/runnable.rb:35: syntax error, unexpected ',', expecting '|' (SyntaxError) | |
define_method(name) do |*expectings, &expectation_block| | |
^ | |
./test/../lib/riot/runnable.rb:51: syntax error, unexpected kEND, expecting $end | |
end # Riot | |
^ | |
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from ./test/../lib/riot.rb:4 | |
from ./test/teststrap.rb:2:in `require' | |
from ./test/teststrap.rb:2 |
This file contains 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
class Assertion < RunnableBlock | |
def self.pass() [:pass]; end | |
def self.fail(message) [:fail, message]; end | |
def self.error(e) [:error, e]; end | |
def run(situation) | |
#apply expectation block | |
@expectings << situation.evaluate(&@expectation_block) if @expectation_block | |
action = @@assertions[@action] | |
process_macro(situation,action[0]) { |actual| action[1].call(actual,*@expectings) } | |
end |
This file contains 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
require 'rubygems' | |
require 'riot' | |
module Bang | |
def go | |
"yes" | |
end | |
end | |
class Boom |
This file contains 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
class Person | |
def say | |
"hi" | |
end | |
def jump | |
"i jumped" | |
end | |
def dance |
OlderNewer