Uh oh!
There was an error while loading. Please reload this page.
Removes ActiveRecord from all the things. - #146
Conversation
steveklabnik
commented
Apr 18, 2013
Seems good but the build failed for some reason :( |
nuclearsandwich
commented
Apr 18, 2013
Yeah. Still debugging |
nuclearsandwich
commented
Apr 18, 2013
So the |
abhirao
commented
Apr 19, 2013
I took a quick look. It seems we're currently not getting the db:test:prepare task from mongo_mapper. It sees that active record has already defined it so it does not override it. See line 48 on https://github.com/jnunemaker/mongomapper/blob/master/lib/mongo_mapper/railtie/database.rake So I think the correct fix would be to add a config by using rails generate mongo_mapper:config. Then you could also clean up the mongo_mapper initializer. |
nuclearsandwich
commented
Apr 19, 2013
From http://guides.rubyonrails.org/testing.html
I'd rather Rails's |
nuclearsandwich
commented
Apr 19, 2013
Oh, you know, we define a no op db test prepare in https://github.com/hacketyhack/hackety-hack.com/blob/master/lib/tasks/cucumber.rake#L53-L55 I wonder if we're stepping on Mongo's task's toes. |
I don't like this, I think it might be worth 💀ing Mongo's `db:test:prepare` task and replacing it with a no op one. The logic in the config/mongo.yml file mirrors the logic in the Ruby initializer, but no one should rightfully expect logic to exist in the yml file.
nuclearsandwich
commented
Apr 19, 2013
🎊 🍸 Travis says this works. But I hate myself for doing it. @steveklabnik what do you think? Rip out MongoMapper's rake task and go back to a Ruby initializer or use magical erb'd yaml? |
PragTob
commented
Apr 19, 2013
I'd prefer a different solution and don't have a very firm grasp of the problem atm. But can't we just make our tasks NOT depend on take db:test:prepare so we won't need it? Shouldn't it work then or what am I missing (just chiming in from the side :-) ) |
nuclearsandwich
commented
Apr 19, 2013
If we decide not to use the rake tasks, I would opt to create shell scripts rather than new rake tasks. The existing tasks come directly from rspec and cucumber and I believe just run the whole suite. I don't know if the rake tasks themselves pass logic for rerunning tests. The spec_helper.rb and support/env.rb files set up database cleaner but don't explicitly add any seed data. |
steveklabnik
commented
Apr 19, 2013
I dunno what to do. |
nuclearsandwich
commented
Apr 19, 2013
If folks are ambivalent about it, my feeling is to lean toward convention, which is rake tasks and a mongo.yml. |
Near as I can tell, we aren't using ActiveRecord. This clears the database.yml, sqlite and pg gems, and related railtie from the application. Which will prevent new (or stale) contributors from going on wild goose chases.