Learn how to instrument html documents to make them active specifications with rcor.
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
<body>
The greeting should be: <p concordion:assertEquals="get_greeting">Hello World!</p>
</body>
</html>
class BasicAssertTest < ConcordionTestCase
def get_greeting
"Hello World!" # Normally this would call the code you're trying to test
end
end
Then we create a script to run our hello world test: "run_the_spec.rb".
# This is the simplest script to run an RCor spec, normally would be a Rake script.
require 'test/unit'
require 'rcor'
require 'basic_assert_test'
The Greeting should be: <p concordion:assertequals="get_greeting" class="concordion_success">Hello World!</p>
Have a look at a more ComplexExample, or see WhatRcorActuallyDoes, or VariationsOnAttributes.