0

I have a file called test_spec.rb inside my spec/features folder. It runs good when I type

rake spec

But it doesn't load any data from the database. I have put some database in test and development environment in Database.yml

So both database are same, I got only one database, i.e. app_development.

I want that the select query should be able to fetch MySQL data inside the test_spec.rb.

1 Answer 1

1

I think you missed to migrate your database in test environment. Try to run this in your Project root folder.

rake db:migrate RAILS_ENV=test
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.