spec/baron_spec.rb in baron-1.0.2 vs spec/baron_spec.rb in baron-1.0.3
- old
+ new
@@ -61,11 +61,11 @@
it_behaves_like "Server Response"
it_behaves_like "Server HTML Response"
end
- describe "GET category index page" do
+ describe "GET category home page" do
before :all do
@response = @baron.get('/poems/')
end
it_behaves_like "Server Response"
@@ -109,11 +109,15 @@
it "returns proper error data" do
response = @baron.get('/fake-url-of-impossible-page-give-me-your-404-error')
response.status.should == 404
response.body.should include('Page not found')
response.body.should include('404')
+ # should not render in the layout.rhtml if <html is in the first 100 chars
+ response.body.should_not include("<meta name=\"description\" content="">")
+ response.body.should include ('Error')
end
+
end
describe "GET /feed.rss" do
before :all do
@response = @baron.get('/feed.rss')
@@ -126,10 +130,10 @@
@response.body.should include("#{@config[:url]}/feed.rss")
@response.body.scan(/<entry>/).count.should == 3
@response.body.scan(/<\/entry>/).count.should == 3
@response.body.should include('<feed')
@response.body.should include('</feed>')
- end
+ end
end
describe "GET /robots.txt" do
before :all do
@response = @baron.get('/robots.txt')