1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

move mongoid and mongo_mapper loading and initialisation into its own file

This commit is contained in:
Thorsten Böttger 2017-02-10 22:32:37 +11:00
parent 68d945f0fb
commit 54ccc5425b

View file

@ -1,10 +1,8 @@
require 'spec_helper'
require 'generator_spec'
require 'generators/mongoid/aasm_generator'
begin
require "mongoid"
puts "mongoid gem found, running mongoid specs \e[32m#{'✔'}\e[0m"
if defined?(Mongoid::Document)
require 'generator_spec'
require 'generators/mongoid/aasm_generator'
describe Mongoid::Generators::AASMGenerator, type: :generator do
destination File.expand_path("../../../tmp", __FILE__)
@ -29,6 +27,5 @@ begin
end
end
rescue LoadError
puts "mongoid gem not found, not running mongoid specs \e[31m#{'✖'}\e[0m"
end