<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/app_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,203 +1,19 @@
+
 require &quot;#{File.dirname(__FILE__)}/spec_helper&quot;
 
 describe 'main aerial application' do
 
   before do
-    @articles = Article.all
     setup_repo
   end
 
-  it &quot;should define the root directory&quot; do
-    AERIAL_ROOT.should_not be_nil
-  end
-
-  it &quot;should define the configuration file&quot; do
-    CONFIG.should_not be_nil
-  end
-
-  it 'should show the default index page' do
-    get '/'
-    last_response.should be_ok
-  end
-
-  it 'should send the not_found action if page does not exists' do
-    get '/does_not_exist.html'
-    last_response.status.should == 200
-  end
-
-  it &quot;should render a single article page&quot; do
-    get '/2009/1/31/test-article'
-    last_response.status.should == 200
-  end
-
-  it &quot;should render the home page&quot; do
-    get '/home'
-    last_response.status.should == 200
-  end
-
-  describe &quot;calling /style.css&quot; do
-
-    before do
-      get '/style.css'
-    end
-
-    it &quot;should return an okay status code&quot; do
-      last_response.status.should == 200
-    end
-
-    it &quot;should return a css stylesheet&quot; do
-      last_response.headers[&quot;Content-Type&quot;].should == &quot;text/css;charset=utf-8&quot;
-    end
-
-  end
-
-  describe &quot;calling /tags&quot; do
-
-    before do
-      @article = Article.new(:title        =&gt; &quot;Test Article&quot;,
-                             :tags         =&gt; &quot;git, sinatra&quot;,
-                             :publish_date =&gt; DateTime.new,
-                             :comments     =&gt; [],
-                             :file_name    =&gt; &quot;test-article&quot;)
-      Aerial::Article.stub!(:with_tag).and_return([@article])
-      get '/tags/git'
-    end
-
-    it &quot;should return a valid response&quot; do
-      last_response.status.should == 200
-    end
-
-    it &quot;should return a response body&quot; do
-      last_response.body.should_not be_empty
-    end
-
-  end
-
-  describe &quot;calling /feed&quot; do
-
-    before do
-      @articles = Article.find_all
-      Aerial::Article.stub!(:all).and_return(@articles)
-      get '/feed'
-    end
-
-    it &quot;should produce an rss tag&quot; do
-      last_response.body.should have_tag('//rss')
-    end
-
-    it &quot;should contain a title tag&quot; do
-      last_response.body.should have_tag('//title').with_text(Aerial.config.title)
-    end
-
-    it &quot;should contain a language tag&quot; do
-      last_response.body.should have_tag('//language').with_text(&quot;en-us&quot;)
-    end
-
-    it &quot;should contain a description tag that containts the subtitle&quot; do
-      last_response.body.should have_tag('//description').with_text(Aerial.config.subtitle)
-    end
-
-    it &quot;should contain an item tag&quot; do
-      last_response.body.should have_tag('//item')
-    end
-
-    it &quot;should have the title tags for the articles&quot; do
-      last_response.body.should have_tag('//item[1]/title').with_text(@articles[0].title)
-      last_response.body.should have_tag('//item[2]/title').with_text(@articles[1].title)
-    end
-
-    it &quot;should have the link tag with the articles permalink&quot; do
-      #last_response.body.should have_tag('//item[1]/link').with_text(&quot;http://#{@articles[0].permalink}&quot;)
-    end
-
-    it &quot;should have a pubDate tag with the article's publication date&quot; do
-      last_response.body.should have_tag('//item[1]/pubDate').with_text(@articles[0].publish_date.to_s)
-      last_response.body.should have_tag('//item[2]/pubDate').with_text(@articles[1].publish_date.to_s)
-    end
-
-    it &quot;should have a guid date that matches the articles id&quot; do
-      last_response.body.should have_tag('//item[1]/guid').with_text(@articles[0].id)
-      last_response.body.should have_tag('//item[2]/guid').with_text(@articles[1].id)
-    end
-
-    after do
-      @articles = nil
-    end
-
-  end
-
-  describe &quot;calling /feed&quot; do
-
-    before do
-      @articles = Article.find_all
-      Aerial::Article.stub!(:all).and_return(@articles)
-      get '/articles'
-    end
-
-    it &quot;should return a valid response&quot; do
-      last_response.status.should == 200
-    end
-
-    it &quot;should return a response body&quot; do
-      last_response.body.should_not be_empty
-    end
-
-  end
-
-
-  describe &quot;calling /archives&quot; do
-    before do
-      @article = Article.new(:title        =&gt; &quot;Test Article&quot;,
-                             :body         =&gt; &quot;Test Content&quot;,
-                             :id           =&gt; 333,
-                             :publish_date =&gt; DateTime.new,
-                             :comments     =&gt; [],
-                             :file_name    =&gt; &quot;test-article.article&quot;)
-      Aerial::Article.stub!(:with_date).and_return([@article])
-      get '/archives/year/month'
-    end
-
-    it &quot;should return a valid response&quot; do
-      last_response.status.should == 200
-    end
-
-  end
-
-  describe &quot;posting a new comment&quot; do
-
-    before do
-      @article = Article.new(:title     =&gt; &quot;Test Article&quot;,
-                             :body      =&gt; &quot;Test Content&quot;,
-                             :file_name =&gt; &quot;test-article&quot;,
-                             :archive_name =&gt; &quot;test-article&quot;,
-                             :id        =&gt; 333)
-      Aerial::Article.stub!(:find).and_return(@article)
-      @article.stub!(:comments).and_return(Array.new)
-      @article.stub!(:permalink).and_return('/permalink')
-      post &quot;/article/#{@article.id}/comments&quot;
-    end
-
-    it &quot;should return a valid response&quot; do
-      last_response.status.should == 204
-    end
-  end
-
-  describe &quot;calling Git operations&quot; do
-
-    before do
-      @dir = &quot;#{Aerial.repo.working_dir}/articles/new_dir&quot;
-      FileUtils.mkdir(@dir)
-      FileUtils.cd(@dir) do
-        FileUtils.touch 'new.file'
-      end
-    end
-
-    it &quot;should commit all new untracked and tracked content&quot; do
-      Aerial.repo.status.untracked.should_not be_empty
-      get '/'
-      # Aerial.repo.status.untracked.should be_empty
-    end
-
+  it &quot;should load the configuration from the file&quot; do
+    Aerial.config.should_not be_nil
+    Aerial.config.name.should == &quot;Aerial&quot;
+    Aerial.config.public.dir.should == &quot;public&quot;
+    Aerial.config.author.should == &quot;Awesome Ruby Developor&quot;
+    Aerial.config.subtitle.should == &quot;Article, Pages, and such&quot;
+    Aerial.config.email.should == &quot;aerial@example.com&quot;
   end
 
 end</diff>
      <filename>spec/aerial_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,9 +12,9 @@ describe 'article' do
       @article = Article.with_name(&quot;test-article-one&quot;)
     end
 
-    it &quot;should find an article with .article extension &quot; do
-      @article.should_not be_nil
-    end
+     it &quot;should find an article with .article extension &quot; do
+       @article.should_not be_nil
+     end
 
     it &quot;should assign the article's author&quot; do
       @article.author.should == &quot;Matt Sears&quot;</diff>
      <filename>spec/article_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,8 @@ require 'spec'
 require 'rack/test'
 
 def app
-  Sinatra::Application
+  Aerial::App.set :root, File.expand_path( File.join(File.dirname(__FILE__), 'repo') )
+  Aerial::App
 end
 
 # Helper for matching html tags
@@ -66,7 +67,6 @@ module GitHelper
 
   def new_git_repo
     delete_git_repo # delete the old repo first
-
     path = File.expand_path( File.join(File.dirname(__FILE__), 'repo') )
     data = File.expand_path( File.join(File.dirname(__FILE__), 'fixtures') )
     Dir.mkdir(path)
@@ -98,8 +98,10 @@ include GitHelper
 
 Spec::Runner.configure do |config|
   repo_path = new_git_repo
+
   CONFIG = YAML.load_file( File.join(File.dirname(__FILE__), 'fixtures', 'config.yml') ) unless defined?(CONFIG)
   AERIAL_ROOT = File.join(File.dirname(__FILE__), 'repo') unless defined?(AERIAL_ROOT)
+
   require File.expand_path(File.dirname(__FILE__) + &quot;/../lib/aerial&quot;)
   config.include TagMatchers
   config.include GitHelper
@@ -113,10 +115,15 @@ set :environment, :test
 set :run, false
 set :raise_errors, true
 set :logging, false
+set :views =&gt; File.join(File.dirname(__FILE__), &quot;/..&quot;, &quot;repo&quot;, &quot;views&quot;),
+:public =&gt; File.join(File.dirname(__FILE__), &quot;/..&quot;, &quot;repo&quot;, &quot;public&quot;)
 
 include Aerial
 
 def setup_repo
   @repo_path = new_git_repo
+  @config_path = File.join(@repo_path, &quot;config&quot;)
   Aerial.stub!(:repo).and_return(Grit::Repo.new(@repo_path))
+  Aerial.new(@repo_path, &quot;config.yml&quot;)
+
 end</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3f8f5f464ed737e5c216d90f5db513d4d7521be1</id>
    </parent>
  </parents>
  <author>
    <name>Matt Sears</name>
    <email>matt@mattsears.com</email>
  </author>
  <url>http://github.com/mattsears/aerial/commit/233effb28ae5861cc78ada7f54e31a798472d651</url>
  <id>233effb28ae5861cc78ada7f54e31a798472d651</id>
  <committed-date>2009-10-18T19:52:33-07:00</committed-date>
  <authored-date>2009-10-18T19:52:33-07:00</authored-date>
  <message>Repaired rspec test to reflect the the new directory structure</message>
  <tree>c3445a2c49c166070124d9537b5604d8771352bf</tree>
  <committer>
    <name>Matt Sears</name>
    <email>matt@mattsears.com</email>
  </committer>
</commit>
