diff --git a/test/test_excerpt.rb b/test/test_excerpt.rb index e1558681..d93413f8 100644 --- a/test/test_excerpt.rb +++ b/test/test_excerpt.rb @@ -56,6 +56,17 @@ class TestExcerpt < Test::Unit::TestCase end end + context "#to_s" do + should "return its content if no output present" do + assert_equal @excerpt.content, @excerpt.to_s + end + + should "return its output if output present" do + @excerpt.output = "Fake Output" + assert_equal @excerpt.output, @excerpt.to_s + end + end + context "#inspect" do should "contain the excerpt id" do assert_include @excerpt.inspect, @excerpt.id