title: Switching from Test::Unit to RSpec/FactoryGirl
body: <p>I've got an example set up demonstrating Test::Unit's testing. I want to use RSpec and FactoryGirl in order to do the equivalent of this example. I seem to be having trouble accomplishing that, so any help would be appreciated!</p>
  
  <p>Terminal</p>
  
  <pre><code>$ rails new lab
  $ cd lab
  $ rails g model foo bar:integer
  $ open test/unit/foo_test.rb
  </code></pre>
  
  <p>Ruby</p>
  
  <pre><code>#insert into test/unit/foo_test.rb
  test "example test" do
    assert_not_nil foos(:one).bar, "FooBar is Nil"
    assert_instance_of Fixnum, foos(:one).bar, "FooBar isn't a Fixnum"
    assert_equal 1, foos(:one).bar, "Foobar != 1"
  end
  </code></pre>
  
  <p>Terminal</p>
  
  <pre><code>$ rake db:migrate
  $ rake test
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>Run options: 
  
  # Running tests:
  
  .
  
  Finished tests in 0.109820s, 9.1058 tests/s, 27.3174 assertions/s.
  
  1 tests, 3 assertions, 0 failures, 0 errors, 0 skips
  </code></pre>