spec/spec_helper.rb in notifiable-apns-grocer-0.13.1 vs spec/spec_helper.rb in notifiable-apns-grocer-0.15.0

- old
+ new

@@ -14,11 +14,11 @@ require 'notifiable' require 'grocer' require File.expand_path("../../lib/notifiable/apns/grocer", __FILE__) Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } -db_path = 'spec/support/db/test.sqlite3' +db_path = 'spec/test.sqlite3' DatabaseCleaner.strategy = :truncation Rails.logger = Logger.new(STDOUT) require 'byebug' @@ -38,10 +38,11 @@ :pool => 5, :timeout => 5000} ) ActiveRecord::Migration.verbose = false - ActiveRecord::Migrator.migrate "spec/support/db/migrate" + notifiable_rails_path = Gem.loaded_specs['notifiable-rails'].full_gem_path + ActiveRecord::Migrator.migrate File.join(notifiable_rails_path, 'db', 'migrate') @grocer = Grocer.server(port: 2195) @grocer.accept }