Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cucumber.rake should execute db:test:clone not test:prepare #278
As I just mentioned in $277 I did a
It took me ages to figure out but it seems that the Rails team have silently restructured the way that all of the Rake tasks work for cloning the structure of the development database to a freshly built test database.
From what I can tell the test:prepare task used to rebuild the test database. Now it appears from
that prepare is now only the task to 'Check for pending migrations and load the test schema'
I had to update all occurrences of test:prepare in cucumber.rake, such as in:
with db:test:clone to get rake cucumber to rebuild my test database prior to running mu cucumber features.
So shouldn't the cucumber.rake task generated now be using db:test:clone?
I should note that I am using
and also had to add the line to application.rb:
ActiveRecord::Base.schema_format = config.active_record.schema_format
as a workaround as ActiveRecord::Base.schema_format was still being evaluated as :ruby in the clone task of databases.rake and is supposed to evaluate as :sql as a result of my config setting
Again this should be dependent on the Rails version I guess as this only
I have fixed my immediate issue but wont be able to get to this for a while
On Thu, Feb 27, 2014 at 2:22 AM, Kosmas Chatzimichalis <
Maybe I am just confused about things because I dont use migrations. And I
I use config.active_record.schema_format = :sql
When I start a test run I want a copy of my development database schema "as
Under Rails 4 the test:prepare task didnt appear to behave in this same way
But it does seem to be the case that all the rake tasks have been changed
On Fri, Feb 28, 2014 at 3:07 AM, Steve Tooke firstname.lastname@example.org:
I think it makes more sense like that.
I will have a look, but I believe that we should also change it and use the test:clone.
I believe that checking for pending migrations before running the tests has bee the expected behaviour in a rails project as long as I've used it. If you have migrations that haven't been run on your database then how can you be sure that your tests (that hit the DB) are passing or failing correctly?
@Kosmas I think the best solution might be to add