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
57f18bac89
commit
68d945f0fb
6 changed files with 28 additions and 32 deletions
6
spec/spec_helpers/mongo_mapper.rb
Normal file
6
spec/spec_helpers/mongo_mapper.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
begin
|
||||
require 'mongo_mapper'
|
||||
puts "mongo_mapper gem found, running MongoMapper specs \e[32m#{'✔'}\e[0m"
|
||||
rescue LoadError
|
||||
puts "mongo_mapper gem not found, not running MongoMapper specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
6
spec/spec_helpers/mongoid.rb
Normal file
6
spec/spec_helpers/mongoid.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
begin
|
||||
require 'mongoid'
|
||||
puts "mongoid gem found, running mongoid specs \e[32m#{'✔'}\e[0m"
|
||||
rescue LoadError
|
||||
puts "mongoid gem not found, not running mongoid specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
|
@ -1,9 +1,7 @@
|
|||
describe 'mongo_mapper' do
|
||||
begin
|
||||
require 'mongo_mapper'
|
||||
require 'logger'
|
||||
require 'spec_helper'
|
||||
puts "mongo_mapper gem found, running MongoMapper specs \e[32m#{'✔'}\e[0m"
|
||||
|
||||
if defined?(MongoMapper)
|
||||
describe 'mongo_mapper' do
|
||||
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
|
@ -142,7 +140,5 @@ describe 'mongo_mapper' do
|
|||
end
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
puts "mongo_mapper gem not found, not running MongoMapper specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
describe 'mongo_mapper' do
|
||||
begin
|
||||
require 'mongo_mapper'
|
||||
require 'logger'
|
||||
require 'spec_helper'
|
||||
puts "mongo_mapper gem found, running MongoMapper specs \e[32m#{'✔'}\e[0m"
|
||||
|
||||
if defined?(MongoMapper)
|
||||
describe 'mongo_mapper' do
|
||||
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
|
@ -89,7 +87,5 @@ describe 'mongo_mapper' do
|
|||
end
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
puts "mongo_mapper gem not found, not running MongoMapper specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
describe 'mongoid' do
|
||||
begin
|
||||
require 'mongoid'
|
||||
require 'logger'
|
||||
require 'spec_helper'
|
||||
puts "mongoid gem found, running mongoid specs \e[32m#{'✔'}\e[0m"
|
||||
|
||||
if defined?(Mongoid::Document)
|
||||
describe 'mongoid' do
|
||||
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongoid/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
|
@ -123,7 +121,5 @@ describe 'mongoid' do
|
|||
end
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
puts "mongoid gem not found, not running mongoid specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
describe 'mongoid' do
|
||||
begin
|
||||
require 'mongoid'
|
||||
require 'logger'
|
||||
require 'spec_helper'
|
||||
puts "mongoid gem found, running mongoid specs \e[32m#{'✔'}\e[0m"
|
||||
|
||||
if defined?(Mongoid::Document)
|
||||
describe 'mongoid' do
|
||||
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongoid/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
|
@ -86,7 +84,5 @@ describe 'mongoid' do
|
|||
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
puts "mongoid gem not found, not running mongoid specs \e[31m#{'✖'}\e[0m"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue