test/nytimes/articles/test_article.rb in nytimes-articles-0.4.0 vs test/nytimes/articles/test_article.rb in nytimes-articles-0.4.1

- old
+ new

@@ -245,9 +245,21 @@ should "send through as -fee:Y if set to false" do Article.expects(:invoke).with(has_entry("query", "ice cream -fee:Y")) Article.search "ice cream", :fee => false end end + + context ":comments" do + should "send through as comments:Y if set to true" do + Article.expects(:invoke).with(has_entry("query", "ice cream comments:Y")) + Article.search "ice cream", :comments => true + end + + should "send through as -comments:Y if set to false" do + Article.expects(:invoke).with(has_entry("query", "ice cream -comments:Y")) + Article.search "ice cream", :comments => false + end + end context ":fields" do context "when not specified at all" do should "pass all fields in a comma-delimited list" do Article.expects(:invoke).with(has_entry('fields', Article::ALL_FIELDS.join(',')))