title: Capybara skips a controller action but still ends up with the proper view, so the tests pass
body: <p>This is the most confusing thing I have dealt with in a long time. I have a controller action that sends an e-mail when a comment is made:</p>
  
  <pre><code>class CommentsController &lt; ActionController::Base
    def create
      @comment = Comment.new(params[:comment])
      @comment.author = current_user
      @comment.save
      CommentMailer.recent_comment_made(@comment).deliver
      respond_with(@comment)
    end
  end
  </code></pre>
  
  <p>I would like to test it. My tests go to the proper page (I've verified this), where there is a form with action /comments. It then submits the form and returns the view with a successful flash (using FlashResponder) and everything seems great... but the e-mail is never sent. In fact, the entire create action is never called. The weird thing is <strong>the same process works in development but sends the e-mail!</strong></p>
  
  <p>Now I know it's getting to the correct controller, because I can add this:</p>
  
  <pre><code>before_filter { raise }
  </code></pre>
  
  <p>And the tests fail. I can add:</p>
  
  <pre><code>before_filter { p params }
  </code></pre>
  
  <p>And I see the parameters, which have controller as 'comments' and action as 'create'. But if I add:</p>
  
  <pre><code>def create
    raise
    ...
  </code></pre>
  
  <p>No exception is raised. In fact I can just comment out the entire create method and the test still passes, with the comment being created and everything. I am not using InheritedResources or anything of that kind. And like I said... it works on development!</p>
  
  <p>I've used <code>save_and_open_page</code> after every step and it all looks good. The form action is correct. The flash message is correct. The assertion that the comment is created is correct... even when the create method is commented out completely.</p>
  
  <p>Originally I thought that it was the wrong controller or that Cucumber was using some older version of my controller for some unknown reason, but when I add the before_filters to raise/print params... that all happens and works as expected.</p>
  
  <p>Does anyone know what could be going on here, or any way I can at least SEE what is going on here? I am all out of ideas. My feature looks like this:</p>
  
  <pre><code>Given I visit the page
  And I enter a comment
  When I submit the comment
  Then the e-mail is delivered
  And the comment is saved to the database
  </code></pre>
  
  <p>These are made more generic than they actually are to conceal the actual intent of the project. The step definition pseudo code is:</p>
  
  <pre><code>visit ...
  fill_in ...
  find('submit button').click
  assert ActionMailer::Base.deliveries.include? ...
  assert comments.present?
  </code></pre>
  
  <p>Pretty simple stuff. Visit a page, submit a form, assert that the stuff in the create action worked.</p>