<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>doc/README_FOR_RAILS</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 .DS_Store
 *.sqlite3
-tmp/**/*
+tmp/
 log/*.log
 log/*.pid
 public/cache</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,8 @@
 class Post &lt; ActiveRecord::Base
   belongs_to :author, :class_name =&gt; &quot;User&quot;
   
+  named_scope :published, :conditions =&gt; {:published =&gt; true}
+  
   validates_presence_of :title
   validates_presence_of :body
   validates_uniqueness_of :title</diff>
      <filename>app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,8 +25,6 @@ Rails::Initializer.run do |config|
   # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
   config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;  # NOTE: remove this if we do not use sqlite in production
   config.gem &quot;authlogic&quot;
-  config.gem 'thoughtbot-shoulda', :lib =&gt; 'shoulda/rails', :source =&gt; &quot;http://gems.github.com&quot;
-  config.gem &quot;thoughtbot-factory_girl&quot;, :lib =&gt; &quot;factory_girl&quot;, :source =&gt; &quot;http://gems.github.com&quot;
 
   # Only load the plugins named here, in the order given. By default, all plugins 
   # in vendor/plugins are loaded in alphabetical order.</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,3 +20,9 @@ config.action_controller.allow_forgery_protection    = false
 # The :test delivery method accumulates sent emails in the
 # ActionMailer::Base.deliveries array.
 config.action_mailer.delivery_method = :test
+
+config.gem &quot;thoughtbot-factory_girl&quot;, :lib =&gt; &quot;factory_girl&quot;, :source =&gt; &quot;http://gems.github.com&quot;
+config.gem 'thoughtbot-shoulda', :lib =&gt; 'shoulda/rails', :source =&gt; &quot;http://gems.github.com&quot;, :version =&gt; '&gt;= 2.0.0'
+config.gem 'mocha'
+config.gem 'quietbacktrace'
+config.gem 'faker'
\ No newline at end of file</diff>
      <filename>config/environments/test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,18 +5,18 @@ require 'faker'
 # Faker documentation: http://faker.rubyforge.org/rdoc/
 
 Factory.define :user do |f|
-  f.username { Faker::Internet.user_name }
-  f.email {|u| &quot;#{u.username}@uci.edu&quot; }
-  f.name { Faker::Name.name }
-  f.password 'qwerty'
+  f.username              { Faker::Internet.user_name }
+  f.email                 { |u| &quot;#{u.username}@uci.edu&quot; }
+  f.name                  { Faker::Name.name }
+  f.password              'qwerty'
   f.password_confirmation 'qwerty'
 end
 
 Factory.define :event do |f|
-  f.name { &quot;Workshop on #{Faker::Company.catch_phrase}&quot;}
-  f.description { Faker::Lorem.paragraph }
-  f.start_time { Time.now }
-  f.end_time {|e| e.start_time + rand(10).hour }
+  f.name          { &quot;Workshop on #{Faker::Company.catch_phrase}&quot; }
+  f.description   { Faker::Lorem.paragraph }
+  f.start_time    { Time.now }
+  f.end_time      { |e| e.start_time + rand(10).hour }
 end
 
 Factory.define :rsvp do |f|
@@ -25,8 +25,8 @@ Factory.define :rsvp do |f|
 end
 
 Factory.define :post do |f|
-  f.title { Faker::Lorem.sentence }
-  f.body { Faker::Lorem.paragraph }
+  f.title         { Faker::Lorem.sentence }
+  f.body          { Faker::Lorem.paragraph }
   f.association :author, :factory =&gt; :user
   f.published true
 end
\ No newline at end of file</diff>
      <filename>test/factories.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,45 +1,45 @@
 require 'test_helper'
 
 class EventsControllerTest &lt; ActionController::TestCase
-  test &quot;should get index&quot; do
-    get :index
-    assert_response :success
-    assert_not_nil assigns(:events)
-  end
-
-  test &quot;should get new&quot; do
-    get :new
-    assert_response :success
-  end
-
-  test &quot;should create event&quot; do
-    assert_difference('Event.count') do
-      post :create, :event =&gt; { }
-    end
-
-    assert_redirected_to event_path(assigns(:event))
-  end
-
-  test &quot;should show event&quot; do
-    get :show, :id =&gt; events(:one).id
-    assert_response :success
-  end
-
-  test &quot;should get edit&quot; do
-    get :edit, :id =&gt; events(:one).id
-    assert_response :success
-  end
-
-  test &quot;should update event&quot; do
-    put :update, :id =&gt; events(:one).id, :event =&gt; { }
-    assert_redirected_to event_path(assigns(:event))
-  end
-
-  test &quot;should destroy event&quot; do
-    assert_difference('Event.count', -1) do
-      delete :destroy, :id =&gt; events(:one).id
-    end
-
-    assert_redirected_to events_path
-  end
+  # test &quot;should get index&quot; do
+  #   get :index
+  #   assert_response :success
+  #   assert_not_nil assigns(:events)
+  # end
+  # 
+  # test &quot;should get new&quot; do
+  #   get :new
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should create event&quot; do
+  #   assert_difference('Event.count') do
+  #     post :create, :event =&gt; { }
+  #   end
+  # 
+  #   assert_redirected_to event_path(assigns(:event))
+  # end
+  # 
+  # test &quot;should show event&quot; do
+  #   get :show, :id =&gt; events(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should get edit&quot; do
+  #   get :edit, :id =&gt; events(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should update event&quot; do
+  #   put :update, :id =&gt; events(:one).id, :event =&gt; { }
+  #   assert_redirected_to event_path(assigns(:event))
+  # end
+  # 
+  # test &quot;should destroy event&quot; do
+  #   assert_difference('Event.count', -1) do
+  #     delete :destroy, :id =&gt; events(:one).id
+  #   end
+  # 
+  #   assert_redirected_to events_path
+  # end
 end</diff>
      <filename>test/functional/events_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,45 +1,100 @@
 require 'test_helper'
 
 class PostsControllerTest &lt; ActionController::TestCase
-  test &quot;should get index&quot; do
-    get :index
-    assert_response :success
-    assert_not_nil assigns(:posts)
-  end
-
-  test &quot;should get new&quot; do
-    get :new
-    assert_response :success
-  end
 
-  test &quot;should create post&quot; do
-    assert_difference('Post.count') do
-      post :create, :post =&gt; { }
+  context 'on GET to :index with no posts' do
+    setup do
+      Post.stubs(:all).returns([])
+      get :index
     end
 
-    assert_redirected_to post_path(assigns(:post))
+    should_assign_to :posts  
+    should_respond_with :success
+    should_render_template :index
   end
-
-  test &quot;should show post&quot; do
-    get :show, :id =&gt; posts(:one).id
-    assert_response :success
+  
+  context 'on GET to :index with a post' do
+    setup do
+      @p1 = Factory(:post)
+      Post.stubs(:all).returns([@p1])
+      get :index
+    end
+  
+    should_assign_to :posts
+    should_respond_with :success
+    should_render_template :index
   end
-
-  test &quot;should get edit&quot; do
-    get :edit, :id =&gt; posts(:one).id
-    assert_response :success
+  
+  context 'on GET to :index rss' do
   end
-
-  test &quot;should update post&quot; do
-    put :update, :id =&gt; posts(:one).id, :post =&gt; { }
-    assert_redirected_to post_path(assigns(:post))
+  
+  context 'on GET to :show' do
+    setup do
+      @post = Factory(:post)
+      get :show, :id =&gt; @post.to_param
+    end
+    
+    should 'recognize route' do
+      assert_recognizes({ :controller =&gt; 'posts', :action =&gt; 'show', :id =&gt; @post.to_param},
+                          :path =&gt; &quot;/posts/#{@post.to_param}&quot;, :method =&gt; :get)
+    end
+    
+    should_assign_to :post
+    should_respond_with :success
+    should_render_template :show
   end
-
-  test &quot;should destroy post&quot; do
-    assert_difference('Post.count', -1) do
-      delete :destroy, :id =&gt; posts(:one).id
+  
+  context 'on GET to :new' do
+    setup do
+      set_session_for(Factory(:user))
+      get :new
+    end
+    
+    should_assign_to :post
+    should_respond_with :success
+    should_render_template :new
+    
+    should 'have new_post form' do
+      assert_select 'form[id=new_post]' do
+        # should_have_event_form_fields
+        assert_select 'input[type=submit][id=post_submit]'
+      end
     end
-
-    assert_redirected_to posts_path
   end
+  
+  # test &quot;should get new&quot; do
+  #   get :new
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should create post&quot; do
+  #   assert_difference('Post.count') do
+  #     post :create, :post =&gt; { }
+  #   end
+  # 
+  #   assert_redirected_to post_path(assigns(:post))
+  # end
+  # 
+  # test &quot;should show post&quot; do
+  #   get :show, :id =&gt; posts(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should get edit&quot; do
+  #   get :edit, :id =&gt; posts(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should update post&quot; do
+  #   put :update, :id =&gt; posts(:one).id, :post =&gt; { }
+  #   assert_redirected_to post_path(assigns(:post))
+  # end
+  # 
+  # test &quot;should destroy post&quot; do
+  #   assert_difference('Post.count', -1) do
+  #     delete :destroy, :id =&gt; posts(:one).id
+  #   end
+  # 
+  #   assert_redirected_to posts_path
+  # end
 end</diff>
      <filename>test/functional/posts_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,45 +1,45 @@
 require 'test_helper'
 
 class UsersControllerTest &lt; ActionController::TestCase
-  test &quot;should get index&quot; do
-    get :index
-    assert_response :success
-    assert_not_nil assigns(:users)
-  end
-
-  test &quot;should get new&quot; do
-    get :new
-    assert_response :success
-  end
-
-  test &quot;should create user&quot; do
-    assert_difference('User.count') do
-      post :create, :user =&gt; { }
-    end
-
-    assert_redirected_to user_path(assigns(:user))
-  end
-
-  test &quot;should show user&quot; do
-    get :show, :id =&gt; users(:one).id
-    assert_response :success
-  end
-
-  test &quot;should get edit&quot; do
-    get :edit, :id =&gt; users(:one).id
-    assert_response :success
-  end
-
-  test &quot;should update user&quot; do
-    put :update, :id =&gt; users(:one).id, :user =&gt; { }
-    assert_redirected_to user_path(assigns(:user))
-  end
-
-  test &quot;should destroy user&quot; do
-    assert_difference('User.count', -1) do
-      delete :destroy, :id =&gt; users(:one).id
-    end
-
-    assert_redirected_to users_path
-  end
+  # test &quot;should get index&quot; do
+  #   get :index
+  #   assert_response :success
+  #   assert_not_nil assigns(:users)
+  # end
+  # 
+  # test &quot;should get new&quot; do
+  #   get :new
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should create user&quot; do
+  #   assert_difference('User.count') do
+  #     post :create, :user =&gt; { }
+  #   end
+  # 
+  #   assert_redirected_to user_path(assigns(:user))
+  # end
+  # 
+  # test &quot;should show user&quot; do
+  #   get :show, :id =&gt; users(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should get edit&quot; do
+  #   get :edit, :id =&gt; users(:one).id
+  #   assert_response :success
+  # end
+  # 
+  # test &quot;should update user&quot; do
+  #   put :update, :id =&gt; users(:one).id, :user =&gt; { }
+  #   assert_redirected_to user_path(assigns(:user))
+  # end
+  # 
+  # test &quot;should destroy user&quot; do
+  #   assert_difference('User.count', -1) do
+  #     delete :destroy, :id =&gt; users(:one).id
+  #   end
+  # 
+  #   assert_redirected_to users_path
+  # end
 end</diff>
      <filename>test/functional/users_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,7 @@
 ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
 require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;)
 require 'test_help'
-gem 'thoughtbot-shoulda', &quot;&gt;= 2.0.0&quot;
-require 'shoulda'
+require 'authlogic/testing/test_unit_helpers'
 require 'factories.rb'
 
 class Test::Unit::TestCase
@@ -30,12 +29,7 @@ class Test::Unit::TestCase
   # instantiated fixtures translates to a database query per test method),
   # then set this back to true.
   self.use_instantiated_fixtures  = false
-
-  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
-  #
-  # Note: You'll currently still have to declare fixtures explicitly in integration tests
-  # -- they do not yet inherit this setting
-  # fixtures :all
-
-  # Add more helper methods to be used by all tests here...
+  
+  self.backtrace_silencers &lt;&lt; :rails_vendor
+  self.backtrace_filters   &lt;&lt; :rails_root
 end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f527d1087b29fc057d7e97aabff2aef741953be7</id>
    </parent>
  </parents>
  <author>
    <name>Robert Olson</name>
    <email>rko618@gmail.com</email>
  </author>
  <url>http://github.com/robolson/acm-website/commit/8d0a59a06e4f231183b623d98caf84675e4ac879</url>
  <id>8d0a59a06e4f231183b623d98caf84675e4ac879</id>
  <committed-date>2009-04-01T19:37:30-07:00</committed-date>
  <authored-date>2009-04-01T19:37:30-07:00</authored-date>
  <message>Random spattering stuff I wrote a long time ago but never committed (bad).</message>
  <tree>c287e7147b2ec7e6d0236dd7a26b6bdac0860273</tree>
  <committer>
    <name>Robert Olson</name>
    <email>rko618@gmail.com</email>
  </committer>
</commit>
