title: RSpec gives error 'trait not registered: name'
body: <p>I tried to test my Rails 3 application on Windows with RSpec. I've wrote tests and factories, but can't solve the issues which raise when I run RSpec on command line. </p>
  
  <p>Here is one of the test files:
      require 'spec_helper'</p>
  
  <pre><code>describe "SignIns" do
    it "can sign in" do
      user = FactoryGirl.create(:user)
      visit new_user_session_path
      fill_in "login", with: user.username
      fill_in "password", with: user.password
      click_on "sign in"
      current_user.username.should == user.username
    end
  end
  </code></pre>
  
  <p>And here's the factories.rb:</p>
  
  <pre><code>factory :layout do
    name "layout1"
  end
  
  factory :club do
    sequence(:name) { |i| "Club #{i}" }
    contact_name "John Doe"
    phone "+358401231234"
    email "#{name}@example.com"
    association :layout
  end
  
  factory :user do
    sequence(:username) { |i| "user#{i}" }
    password 'password'
    email "test@example.com"
    club
  end
  </code></pre>
  
  <p>When I try to run RSpec it gives the following error:</p>
  
  <pre><code>trait not registered: name
    #C: in 'object'
    #.spec/features/sign_in_spec.rb:11:in 'block (2 levels) in (top(required))
  </code></pre>
  
  <p>What am I doing wrong?</p>