Skip to content

Rspec 3.5 + factory_girl-preload are not rolling back on each test #24

@gustavowt

Description

@gustavowt

Hy guys,

I'm trying to configure the RSpec 3.5 and factory_girl-preload 2.3.1 on Rails 5 as a usually do since Rails 2.

I just realized that something has changed on RSpec 3.5 regarding the option use_transactional_fixtures I've noticed that they are not using savepoint anymore, but are using begin/commit transactions. The problems is that, as I'm using a shared connection, every time that I change something on the database it runs a new begin/commit transaction and I'm suspecting that the rollback is not working for this case, because I'm getting some preloaded factories with different data when I run the whole suite, and the tests are running fine when I run a single suite.

Hope you guys could help here, not sure if this must be fixed on this gem or we must report this problem on the RSpec issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions