Browse files

Fixed tests

  • Loading branch information...
1 parent c4f59ec commit 359b9092ea29cf4940073499df5c8bcf73dce440 @ixti committed Aug 14, 2011
Showing with 13 additions and 14 deletions.
  1. +13 −14 test/toto_test.rb
View
27 test/toto_test.rb
@@ -133,20 +133,6 @@
asserts("access the http parameter name value pair") { topic.body }.includes_html("p" => /request name value pair: param=testparam/)
end
- context "Article" do
- context "without category" do
- setup { Toto::Article.new "#{Toto::Paths[:articles]}/1900-05-17-the-wonderful-wizard-of-oz.txt", @config }
- asserts("has category property") { not topic[:category].nil? }
- should("have empty category") { topic.category }.empty
- end
-
- context "with category" do
- setup { Toto::Article.new "#{Toto::Paths[:articles]}/cat/dog/2009-04-01-tilt-factor.txt", @config }
- asserts("has category property") { !topic[:category].nil? }
- should("have non-empty category") { topic.category }.equals "cat/dog"
- end
- end
-
context "TagCloud nubes" do
@@ -174,6 +160,7 @@
end
end
+
context "Article" do
context "without tags" do
setup { Toto::Article.new({ :body => "" }, @config) }
@@ -188,6 +175,18 @@
asserts("which is an array") { topic[:tags].is_a? Array }
should("have elements") { topic.tags.length }.equals 2
end
+
+ context "without category" do
+ setup { Toto::Article.new "#{Toto::Paths[:articles]}/1900-05-17-the-wonderful-wizard-of-oz.txt", @config }
+ asserts("has category property") { not topic[:category].nil? }
+ should("have empty category") { topic.category }.empty
+ end
+
+ context "with category" do
+ setup { Toto::Article.new "#{Toto::Paths[:articles]}/cat/dog/2009-04-01-tilt-factor.txt", @config }
+ asserts("has category property") { !topic[:category].nil? }
+ should("have non-empty category") { topic.category }.equals "cat/dog"
+ end
end
context "GET /tag/oz-wizards (tagged aticles)" do

0 comments on commit 359b909

Please sign in to comment.