pat / combustion

Simple, elegant testing for Rails Engines
MIT License
708 stars 51 forks source link

Fix ActiveRecord::DuplicateMigrationVersionError error #65

Closed artofhuman closed 8 years ago

artofhuman commented 9 years ago

ActiveRecord::DuplicateMigrationVersionError occurs when engine initializer add migrations like this:

class Engine < ::Rails::Engine
  initializer :same_initializer do |app|
    app.config.paths['db/migrate'].concat(config.paths['db/migrate'].expanded)
  end
end
bibendi commented 9 years ago

@pat :up:

bibendi commented 9 years ago

@pat Do you maintain this repo?

pat commented 9 years ago

I do, and I'm well aware I'm much behind with some pull requests…

My concern is that Combustion is ideally built to work with Rails 3.2 onwards, but there are no tests. Writing tests for a testing library and getting them to work across Rails versions is painful - but currently I wonder whether each pull request is catering to behaviour in specific Rails versions, and I just don't know. I've not made the time to write a testing harness or something that would make me more certain, but that's the path I'd like to get things along eventually.

I guess a starting point is: what versions of Rails has this pull request been tested against? :)

artofhuman commented 9 years ago

@pat we tested rails 3.1 3.2 and 4.0 I think i can create 2 gems to reproduce this problem

artofhuman commented 8 years ago

@pat, i add test case, look plz

pat commented 8 years ago

Fantastic, thanks! Just merged it in :D

artofhuman commented 8 years ago

@pat thanks