Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

includes macro test

  • Loading branch information...
commit 0ea55951181a7614f03295ee870bfcafc0b8c4a8 1 parent d9dabf9
cloudhead authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/assertion_macros/includes_test.rb
View
18 test/assertion_macros/includes_test.rb
@@ -0,0 +1,18 @@
+require 'teststrap'
+
+context "An includes assertion macro" do
+ setup do
+ Riot::Assertion.new("an array") { [1, 6, 42, 7] }
+ end
+
+ asserts(":pass when expectation met") do
+ topic.includes(42).run(Riot::Situation.new) == [:pass]
+ end
+
+ context "that is failing" do
+ setup { topic.includes(99).run(Riot::Situation.new) }
+
+ asserts(":fail") { topic.first == :fail }
+ asserts("message") { topic.last == %Q{expected [1, 6, 42, 7] to include 99} }
+ end # that is failing
+end # An includes assertion macro

0 comments on commit 0ea5595

Please sign in to comment.
Something went wrong with that request. Please try again.