database-cleaner Questions

6

Solved

I have database-cleaner configured for my rails 4 application, Each time I run the test, I discovered that my database gets wiped out in both the test and development environment. My configuration...
Chesney asked 11/6, 2015 at 15:21

3

I want to clear my test database before running the each spec files. I am already using rspec with factory girl. Thanks, Hare
Syncom asked 28/1, 2017 at 16:10

2

Solved

My rspec tests seem to run extremely slow even with guard & spork. Finished in 5.36 seconds 13 examples, 2 failures I understand that there are several things I can do to optimize my tests ...

1

Solved

I have upgraded my rails version of a project from 4.2 to 5.2.1 some of my tests are failed because of pg connection closed error on the full trace is is as following. Failure/Error: DatabaseClea...

1

Solved

I have a rails app using rspec and including DatabseCleaner to ensure the test database is clean between each test. DatabaseCleaner is configured in our spec/rails_helper.rb with config.before(...
Matisse asked 31/10, 2018 at 15:40

5

Solved

My Minitest controller tests are working fine if I run them alone using rake minitest:controllers but when I run rake minitest:all then I get validation failed error. It is because email is already...
Watchband asked 28/3, 2013 at 5:52

4

Solved

How I can clean database after each it? In rails I use https://github.com/bmabey/database_cleaner, but I did't find something similar for node.js node.js (v0.10.26), PostgreSQL (9.3.3), mocha, re...
Araliaceous asked 5/3, 2014 at 12:1

1

Solved

From all that I've read about Rails 5.1 new system specs my understanding was that Rails now handles database transactions internally. From Rspec's blog: "[previously] your tests and your code un...
Ampulla asked 12/3, 2018 at 23:45

5

Solved

I have a feature spec with Capybara for a login page, and I am using FactoryGirl + DatabaseCleaner require 'rails_helper' feature 'Admin signs in' do background do FactoryGirl.create(:user) e...

1

Solved

I am running into issues using database cleaner with sequel and sqlite foreign key constraints. Specifically, I am using the :truncation strategy with Capybara integration tests. For the given sam...
Opprobrium asked 24/12, 2015 at 20:13

1

Solved

What is the difference between the following? DatabaseCleaner.clean_with(:truncation) DatabaseCleaner.clean What i'm trying to figure out is what is the best way to clean up a before(:all) hoo...
Adenovirus asked 19/9, 2015 at 15:26

4

Solved

I have added the database_cleaner gem to my rails application in order to clean my database between specs. Here's my current configuration for database_cleaner, located in spec/spec_helper.rb: c...
Helvetic asked 30/11, 2013 at 2:47

1

I am currently using DatabaseCleaner in my Rails project with PostgreSQL running, and set it up as below. RSpec.configure do |config| config.before(:suite) do DatabaseCleaner.clean_with(:truncati...
Knighthood asked 23/6, 2015 at 20:2

1

My frontend is an EmberJS-based app. It's totally async in nature, so testing it with Capybara is pain and misery. On the other hand, Ember provides a fantastic test suite out of the box which make...

3

Solved

I included database_cleaner gem in my rails app. Followed the example given on the git repo and included the following code in spec_helper : Approach 1 config.before(:suite) do DatabaseCleaner....

3

I have an old Rails application upgraded to version 3.2.11 that has a lot of request specifications written using capybara version 1.0.1 and running using the selenium driver. The database are clea...

1

In our Rails 4.0 application using MySql we use rspec together with the database_cleaner gem configured with strategy :transaction to cleanup our database for every test case. If we have custom tra...
Scissors asked 9/8, 2013 at 9:18

2

Solved

I am using Cucumber to write my integration tests and Database Cleaner to keep my db clean. Everything perfectly works as my tests don't require Javascript. I can make these last tests pass using ...

1

Solved

I saw this cool method for only using Database cleaners :truncation for capybara test using :js => true In spec_helper.rb: config.before(:each) do DatabaseCleaner.strategy = if example.metadata[...
Jack asked 14/2, 2013 at 17:51
1

© 2022 - 2024 — McMap. All rights reserved.