Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (26 sloc) 870 Bytes
require 'helper'
describe TestRocket do
it "should find emptiness non-truthful by default" do
(+->{}).must_match(/FAIL/)
end
it "should pass a simple positive assertion" do
(+->{ 2 + 2 == 4 }).must_match(/OK/)
end
it "should pass a simple negative assertion" do
(-->{ 2 + 2 == 5 }).must_match(/OK/)
end
it "should fail a simple erroneous assertion" do
(+->{ 2 + 2 == 5 }).must_match(/FAIL/)
end
it "should fail a simple correct assertion assumed to fail" do
(-->{ 2 + 2 == 4 }).must_match(/FAIL/)
end
it "should give a pending notice" do
(~->{ "a pending test" }).must_match(/PENDING/)
(~->{ "a pending test" }).must_match(/a pending test/)
end
it "should fire a description rocket" do
(!->{ "a description" }).must_match(/FIRE/)
(!->{ "a description" }).must_match(/a description/)
end
end
Something went wrong with that request. Please try again.