<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,84 @@
 require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
 
-describe &quot;/pages&quot; do
-  before(:each) do
-    @response = request(&quot;/pages&quot;)
+describe &quot;Pages controller&quot; do
+
+  it 'should return 404' do
+    @response = request(url(:page, :chapter =&gt; 'non-existing-chapter'))
+    @response.status.should == 404
+  end
+
+  describe 'default language' do
+    before(:each) do
+      @response = request('/')
+    end
+
+    it 'should be successful' do
+      @response.should be_successful
+    end
+  end
+
+  describe 'english' do
+    describe 'table of contents' do
+      before(:each) do
+        @response = request(url(:toc, :language =&gt; 'en'))
+      end
+
+      it 'should be successful' do
+        @response.should be_successful
+      end
+    end
+
+    describe 'chapters' do
+      it 'should find Front Matter' do
+        @response = request_chapter('front-matter')
+        @response.should be_successful
+      end
+
+      it 'should find Introduction' do
+        @response = request_chapter('introduction')
+        @response.should be_successful
+      end
+
+      it 'should find Getting Started' do
+        @response = request_chapter('getting-started')
+        @response.should be_successful
+      end
+
+      it 'should find Interacting with the Database' do
+        @response = request_chapter('interacting-with-the-database')
+        @response.should be_successful
+      end
+
+      it 'should find Testing Your Application' do
+        @response = request_chapter('testing-your-application')
+        @response.should be_successful
+      end
+
+      it 'should find Merb More' do
+        @response = request_chapter('merb-more')
+        @response.should be_successful
+      end
+
+      it 'should find Recipes' do
+        @response = request_chapter('recipes')
+        @response.should be_successful
+      end
+
+      it 'should find Deployment' do
+        @response = request_chapter('deployment')
+        @response.should be_successful
+      end
+
+      it 'should find Appendix' do
+        @response = request_chapter('appendix')
+        @response.should be_successful
+      end
+    end
   end
-end
\ No newline at end of file
+end
+
+private
+
+def request_chapter(chapter)
+  request(url(:page, :chapter =&gt; chapter))
+end</diff>
      <filename>spec/requests/pages_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fd82457ebae22f38940bdb390df91d1299332207</id>
    </parent>
  </parents>
  <author>
    <name>Dale Campbell</name>
    <email>dale@save-state.net</email>
  </author>
  <url>http://github.com/mattetti/merb-book/commit/bec21fb7227e568084861b85f13176c42778eeef</url>
  <id>bec21fb7227e568084861b85f13176c42778eeef</id>
  <committed-date>2008-12-05T13:57:52-08:00</committed-date>
  <authored-date>2008-12-05T13:57:52-08:00</authored-date>
  <message>adding specs for english chapters</message>
  <tree>e4491843c2760f8f2e6da62d2ba944a8ac787bbc</tree>
  <committer>
    <name>Dale Campbell</name>
    <email>dale@save-state.net</email>
  </committer>
</commit>
