<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/factories/user.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -25,4 +25,7 @@ config.action_mailer.delivery_method = :test
 # Use SQL instead of Active Record's schema dumper when creating the test database.
 # This is necessary if your schema can't be completely dumped by the schema dumper,
 # like if you have constraints or database-specific column types
-# config.active_record.schema_format = :sql
\ No newline at end of file
+# config.active_record.schema_format = :sql
+
+config.gem &quot;thoughtbot-factory_girl&quot;, :lib =&gt; &quot;factory_girl&quot;
+config.gem &quot;faker&quot;</diff>
      <filename>config/environments/test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,8 @@ ActionController::Routing::Routes.draw do |map|
   # 
   # map.login &quot;acesso&quot;, :controller =&gt; &quot;user_sessions&quot;, :action =&gt; &quot;new&quot;
   # map.logout &quot;sair&quot;, :controller =&gt; &quot;user_sessions&quot;, :action =&gt; &quot;destroy&quot;
-  # 
-  # map.namespace :admin do |admin|
-  #   admin.resources :speakers
-  # end
   
   map.home &quot;/&quot;,                  :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;index&quot;
-  # map.speakers &quot;/palestrantes&quot;, :controller =&gt; &quot;speakers&quot;, :action =&gt; &quot;index&quot;
   map.agenda &quot;/programacao&quot;,    :controller =&gt; &quot;agenda&quot;,   :action =&gt; &quot;index&quot;
   map.contact &quot;/contato&quot;,       :controller =&gt; &quot;pages&quot;,   :action =&gt; &quot;contact&quot;
   </diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,8 @@ ActiveRecord::Schema.define(:version =&gt; 20091027001050) do
     t.datetime &quot;updated_at&quot;
   end
 
+  add_index &quot;speakers&quot;, [&quot;name&quot;], :name =&gt; &quot;index_speakers_on_name&quot;
+
   create_table &quot;users&quot;, :force =&gt; true do |t|
     t.string   &quot;name&quot;
     t.string   &quot;username&quot;</diff>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,6 @@
 require File.dirname(__FILE__) + '/../spec_helper'
  
 describe UsersController do
-  fixtures :all
   integrate_views
   
   it &quot;new action should render new template&quot; do
@@ -10,31 +9,31 @@ describe UsersController do
   end
   
   it &quot;create action should render new template when model is invalid&quot; do
-    User.any_instance.stubs(:valid?).returns(false)
+    # User.any_instance.stubs(:save?).returns(false)
     post :create
     response.should render_template(:new)
   end
   
   it &quot;create action should redirect when model is valid&quot; do
-    User.any_instance.stubs(:valid?).returns(true)
-    post :create
-    response.should redirect_to(root_url)
+    post :create, :user =&gt; Factory.attributes_for(:user)
+    response.should redirect_to(home_url)
   end
   
   it &quot;edit action should render edit template&quot; do
-    get :edit, :id =&gt; User.first
+    @controller.stub!(:current_user).and_return(Factory(:user))
+    get :edit
     response.should render_template(:edit)
   end
   
   it &quot;update action should render edit template when model is invalid&quot; do
-    User.any_instance.stubs(:valid?).returns(false)
-    put :update, :id =&gt; User.first
+    user = Factory(:user)
+    put :update, :user =&gt; {:name =&gt; ''}
     response.should render_template(:edit)
   end
   
   it &quot;update action should redirect when model is valid&quot; do
-    User.any_instance.stubs(:valid?).returns(true)
-    put :update, :id =&gt; User.first
-    response.should redirect_to(root_url)
+    user = Factory(:user)
+    put :update, :user =&gt; {:name =&gt; &quot;New Name&quot;}
+    response.should redirect_to(home_url)
   end
 end</diff>
      <filename>spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-
-one:
-  name: MyString
-  bio: MyText
-  presentation: MyString
-  description: MyText
-  filename: MyString
-
-two:
-  name: MyString
-  bio: MyText
-  presentation: MyString
-  description: MyText
-  filename: MyString</diff>
      <filename>spec/fixtures/speakers.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +0,0 @@
-one:
-  username: MyString
-  email: MyString
-  password: MyString
-
-two:
-  username: MyString
-  email: MyString
-  password: MyString</diff>
      <filename>spec/fixtures/users.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.dirname(__FILE__) + '/../spec_helper'
 
 describe User do
-  it &quot;should be valid&quot; do
-    User.new.should be_valid
+  it &quot;should not be valid&quot; do
+    Factory.build(:user).should be_valid
   end
 end</diff>
      <filename>spec/models/user_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/controllers/admin/speakers_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/controllers/speakers_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/helpers/admin/speakers_helper.rb</filename>
    </removed>
    <removed>
      <filename>app/helpers/speakers_helper.rb</filename>
    </removed>
    <removed>
      <filename>app/views/admin/speakers/_form.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/admin/speakers/edit.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/admin/speakers/new.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/layouts/admin/speakers.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/speakers/index.html.erb</filename>
    </removed>
    <removed>
      <filename>spec/controllers/admin/speakers_controller_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/controllers/speakers_controller_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/fixtures/admin/admin_speakers.yml</filename>
    </removed>
    <removed>
      <filename>spec/helpers/admin/speakers_helper_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/helpers/speakers_helper_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/integration/admin/admin_speakers_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/routing/admin/speakers_routing_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/admin/speakers/edit.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/admin/speakers/index.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/admin/speakers/new.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/admin/speakers/show.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/agenda/index.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/pages/contact.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/pages/index.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/views/speakers/index.html.erb_spec.rb</filename>
    </removed>
    <removed>
      <filename>test/unit/contact_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>84c046ac006a383a24afaa9450a102ff3c3a05a1</id>
    </parent>
  </parents>
  <author>
    <name>tinogomes</name>
    <email>tinorj@gmail.com</email>
  </author>
  <url>http://github.com/tinogomes/devinsampa/commit/a89a83c2be8084fa076665a44fa26a0630b3f189</url>
  <id>a89a83c2be8084fa076665a44fa26a0630b3f189</id>
  <committed-date>2009-11-05T15:28:20-08:00</committed-date>
  <authored-date>2009-11-05T15:28:20-08:00</authored-date>
  <message>cleaning old admin controllers</message>
  <tree>1575da63d635231ece4f7575e2333cbe376ef60a</tree>
  <committer>
    <name>tinogomes</name>
    <email>tinorj@gmail.com</email>
  </committer>
</commit>
