I see the following in the `spec/dummy/config/database.yml`:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
So, I've generated a migration
`db/migrate/20210216160820_add_sample_engine_grommets.rb` and added a
After that, I've run migrations for development env:
== 20210215210420 CreateSampleEngineWidgets: migrating ========================
== 20210215210420 CreateSampleEngineWidgets: migrated (0.0057s) ===============
== 20210216160820 AddSampleEngineGrommets: migrating ==========================
== 20210216160820 AddSampleEngineGrommets: migrated (0.0040s) =================
DBs reside in
I was surely getting the same message as you:
Migrations are pending. To resolve this issue, run:
bin/rails db:migrate RAILS_ENV=test
You have 1 pending migration:
bundle exec rails db:schema:load RAILS_ENV=test
After that, `rspec` runs just fine:
Warning: the running version of Bundler (2.1.4) is older than the
version that created the lockfile (2.2.3). We suggest you to upgrade
to the version that created the lockfile by running `gem install
Pending: (Failures listed here are expected and do not affect your
1) SampleEngine::Widget add some examples to (or delete)
# Not yet implemented
Finished in 0.00592 seconds (files took 2.1 seconds to load)
1 example, 0 failures, 1 pending
To double-check, I've added `spec/models/sample_engine/grommet_spec.rb`:
RSpec.describe Grommet, type: :model do
and it passes just fine.
Well, only for the first time, because `use_transactional_fixtures` is off.
Hope all that helps.