<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,4 +33,58 @@ describe Page do
         should include(FileSystem::Model::PageExtensions::ClassMethods)
   end
   
+  %w{find_or_initialize_by_filename load_files save_files}.each do |method|
+    it &quot;should redefine #{method} class method&quot; do
+      Page.should respond_to(&quot;#{method}&quot;)
+      Page.should respond_to(&quot;#{method}_with_dir_structure&quot;)
+      Page.should respond_to(&quot;#{method}_without_dir_structure&quot;)
+    end
+  end
+  
+  %w{load_file save_file filename}.each do |method|
+    it &quot;should redefine #{method} instance method&quot; do
+      @model.should respond_to(&quot;#{method}&quot;)
+      @model.should respond_to(&quot;#{method}_with_dir_structure&quot;)
+      @model.should respond_to(&quot;#{method}_without_dir_structure&quot;)
+    end
+  end
+  
+  it &quot;should return each directory representing a page on the filesystem&quot; do
+    Dir.should_receive(:[]).with(MockPage.path + &quot;/*&quot;).and_return([&quot;/slug&quot;])
+    File.should_receive(:directory?).with(&quot;/slug&quot;).and_return(true)
+    MockPage.paths.should == [&quot;/slug&quot;]
+  end
+  
+  it &quot;should return files representing page parts&quot; do
+    Dir.should_receive(:[]).with(MockPage.path + &quot;/*&quot;).and_return([&quot;Part 1.html&quot;])
+    File.should_receive(:directory?).with(&quot;Part 1.html&quot;).and_return(false)
+    @model.part_files(MockPage.path)
+  end
+  
+  it &quot;should return path for yaml file using page slug as filename&quot; do
+    @model.yaml_file(&quot;/slug&quot;).should == &quot;/slug/slug.yaml&quot;
+  end
+  
+  it &quot;should load parts&quot; do
+    # the load_parts methods includes a call to:
+    #   self.parts &lt;&lt; part
+    # which is not immplemented for @model (MockPage)
+    # hence the change to using @page
+    @page = Page.new
+    @file_mock = mock(&quot;file_mock&quot;)
+    @page.should_receive(:open).with(&quot;part file&quot;).and_return(@file_mock)
+    @file_mock.should_receive(:read).and_return(&quot;Content in the file&quot;)
+    @page.load_parts([&quot;part file&quot;])
+    
+    @page.part(&quot;part file&quot;).name.should == 'part file'
+    @page.part(&quot;part file&quot;).filter_id.should == nil
+    @page.part(&quot;part file&quot;).content.should == &quot;Content in the file&quot;
+  end
+  
+end
+
+describe FileNotFoundPage do
+  it &quot;should inherit path from Page&quot; do
+    FileNotFoundPage.path.should == Page.path
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/lib/file_system_model_page_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>69af8f3d671823a2e6e7879b7104dc69bb6b4bf1</id>
    </parent>
  </parents>
  <author>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </author>
  <url>http://github.com/nelstrom/radiant-file-system-extension/commit/65f2f56853322ee2acd50c7d65e314cfc1aa17fb</url>
  <id>65f2f56853322ee2acd50c7d65e314cfc1aa17fb</id>
  <committed-date>2008-11-24T12:33:43-08:00</committed-date>
  <authored-date>2008-11-24T12:33:43-08:00</authored-date>
  <message>Specs for PageExtensions translated from Test::Unit.</message>
  <tree>12c31323ba98bfbc947a98c7d90951b98bb13d39</tree>
  <committer>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </committer>
</commit>
