title: Rails Rspec error - Undefined local variable or method for #<RSpec::Core::ExampleGroup::Nested_3:0...>
body: <p>I'm going through the 11th chapter of Michael Hartl's railstutorial and have run into some rspec errors.</p>
  
  <p><img src="https://i.imgur.com/IYVll91.jpg" alt="rspec error"></p>
  
  <p>I'm not really sure what the error message means by .</p>
  
  <p>Just in case, here's my spec code.</p>
  
  <pre><code>  let(:follower) {FactoryGirl.create(:user)}
    let(:followed) {FactoryGirl.create(:user)}
    let(:relationship) {follower.relationships.build(followed_id: followed_id)}
  
    subject {relationship}
  
    it {should be_valid}
  
    describe "accessible attributes" do
      it "should not allow access to follower_id" do
        expect do
          Relationship.new(follower_id: follower_id)
        end.to raise_error(ActiveModel::MassAssignmentSecurity::Error)
      end
    end
  </code></pre>
  
  <p>Any help would be appreciated. Thanks!</p>