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:
parent
68d945f0fb
commit
54ccc5425b
1 changed files with 4 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue