jnicklas/capybara — Issue #555: more a question than an issue
Author: apneadiving
Created: 2011-12-01 11:42:19+00:00
State: open

Hi and thanks for Capybara!

Because I'm testing a legacy project, I'm writing integration specs which check database value. So I know this is not the real purpose of Capybara.

Anyway, I wonder why this kind of situation happens:

#Case 1: Weird and unexpected
method_to_create_my_object
counter = MyObject.count # => 0

#Case 2: Working but still not understood
method_to_create_my_object
visit root_path
counter = MyObject.count # => 1

Should I deduce the controller's action hasn't ended in Case 1 so I have to query some other page to be sure it has been completed?

Thanks in advance

Benjamin