require 'test/unit'
require 'shoulda'
def should_say_hello
should "say hello" do
puts "should say hello"
check
end
end
class ShouldaTest < Test::Unit::TestCase
def initialize(suite)
super(suite)
puts "->>>>>>>>>>>> Initialize <<<<<<<<<-"
end
context "An new object" do
setup do
puts 'context'
@hw = HelloWorld.new
end
should_say_hello
end
private
def check
assert_equal('hello', @hw.greet)
end
end
class HelloWorld
def initialize
puts 'hello world created'
end
def greet
'hello'
end
end