test/test_serious.rb in serious-0.2.12 vs test/test_serious.rb in serious-0.3.0

- old
+ new

@@ -1,5 +1,6 @@ +# encoding: utf-8 require 'helper' class TestSerious < Test::Unit::TestCase # =================================================================== @@ -12,15 +13,15 @@ should_set_cache_control_to 300 should_contain_text "Serious Test Blog", "#header h1 a" should_contain_elements 3, "ul#articles li" - should_contain_text "Merry Christmas!", "ul#articles li:first" - should_contain_text "Merry christmas, dear reader!", "ul#articles li:first" + should_contain_text "Merry Christmas! ☃", "ul#articles li:first" + should_contain_text "Merry christmas, dear reader! ☃", "ul#articles li:first" should_contain_text "December 24th 2009", "ul#articles li:first .date" - should_not_contain_text "Lorem ipsum dolor...", "ul#articles li:first" + should_not_contain_text "This ain't rails, yet it has ☃!", "ul#articles li:first" should_contain_text "Ruby is the shit!", "ul#articles" should_contain_text "Some kind of introduction and summary", "ul#articles li" should_not_contain_text "The number is 4", "ul#articles li" @@ -43,11 +44,11 @@ should_respond_with 200 should_set_cache_control_to 300 should_contain_text "Archives for 2009", "#container h2:first" should_contain_elements 3, "ul.archives li" - should_contain_text "Merry Christmas!", "ul.archives li:first" + should_contain_text "Merry Christmas! ☃", "ul.archives li:first" should_contain_text "Ruby is the shit!", "ul.archives" should_contain_text "Foo Bar", "ul.archives" end context "GET /2009/12" do @@ -56,11 +57,11 @@ should_respond_with 200 should_set_cache_control_to 300 should_contain_text "Archives for 2009-12", "#container h2:first" should_contain_text 'December 24th 2009', "ul.archives li" should_contain_elements 2, "ul.archives li" - should_contain_text "Merry Christmas!", "ul.archives li:first" + should_contain_text "Merry Christmas! ☃", "ul.archives li:first" should_contain_text "Ruby is the shit!", "ul.archives" end context "GET /2009/12/11" do setup { get '/2009/12/11' } @@ -116,11 +117,11 @@ should_respond_with 200 should_set_cache_control_to 300 should_contain_text "Archives", "#container h2:first" should_contain_elements 4, "ul.archives li" - should_contain_text "Merry Christmas!", "ul.archives li:first" + should_contain_text "Merry Christmas! ☃", "ul.archives li:first" should_contain_text "Ruby is the shit!", "ul.archives" should_contain_text "Foo Bar", "ul.archives" should_contain_text "Disco 2000", "ul.archives li:last" end @@ -131,23 +132,23 @@ context "GET /2009/12/24/merry-christmas" do setup { get '/2009/12/24/merry-christmas' } should_respond_with 200 should_set_cache_control_to 300 - should_contain_text "Merry Christmas!", "#container h2:first" - should_contain_text "Merry Christmas! - Serious Test Blog", "head title" - should_contain_text "Merry christmas, dear reader!", ".article .body" - should_contain_text "Lorem ipsum dolor...", ".article .body" + should_contain_text "Merry Christmas! ☃", "#container h2:first" + should_contain_text "Merry Christmas! ☃ - Serious Test Blog", "head title" + should_contain_text "Merry christmas, dear reader! ☃", ".article .body" + should_contain_text "This ain't rails, yet it has ☃!", ".article .body" should_contain_elements 1, ".article span.author" end # Ensure trailing slashes are possible in urls as well # (fixed in http://github.com/colszowka/serious/commit/b684fad6be15a364e4feba6b4df27ddf404fe610) context "GET /2009/12/24/merry-christmas/" do setup { get '/2009/12/24/merry-christmas/' } should_respond_with 200 - should_contain_text "Merry Christmas!", "#container h2:first" + should_contain_text "Merry Christmas! ☃", "#container h2:first" end context "GET /2009/12/11/ruby-is-the-shit" do setup { get '/2009/12/11/ruby-is-the-shit' } @@ -198,11 +199,11 @@ context "GET /atom.xml" do setup { get '/atom.xml' } should_respond_with 200 should_set_cache_control_to 300 - should_contain_text "Merry Christmas!", "feed entry:first title" + should_contain_text "Merry Christmas! &#9731;", "feed entry:first title" should_contain_text "Christoph Olszowka", "feed entry:first author name:first" end # =================================================================== # Tests for disqus integration @@ -308,10 +309,10 @@ should_respond_with 200 should_set_cache_control_to 300 should_contain_text "About me", "#container .article h2" - should_contain_text "Some text about me", "#container .article .body" + should_contain_text "Some text about me and ☃", "#container .article .body" should_contain_elements 0, ".article span.author" should_contain_text "And some more content with erb", "#container .article .body" end context "GET /pages/about/" do