title: Rspec integration test (involving check box) won't pass
body: <p>I'm working on a goal application, where a user can check a box next to a goal to mark it as complete. I wrote the test for this functionality, but something isn't quite right, because it keeps failing. I eventually got fed up and just wrote the code, which works, but the test still keeps failing. I'm still learning Rspec, so any advice you could give me would be helpful.</p>
  
  <p>The Test</p>
  
  <pre><code># @user has already been signed in
  
  describe "completing a goal" do
  
    before(:each) do
      @goal = Factory(:goal, :user =&gt; @user)
    end
  
    it "should set 'completed' attribute to true" do
      visit edit_goal_path(@goal)
      check('goal_completed')
      click_button('goal_submit')
      @goal.completed.should be_true
    end
  end
  </code></pre>
  
  <p>The Result</p>
  
  <pre><code>Failures:
  
  1) Goals completing a goal should set 'completed' attribute to true
   Failure/Error: @goal.completed.should be_true
     expected nil to be true
   # ./spec/requests/goals_spec.rb:81:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>