mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
clean up: test models need to be required only once
This commit is contained in:
parent
5acb9a4921
commit
01bd975817
4 changed files with 16 additions and 12 deletions
|
@ -4,9 +4,11 @@ describe 'mongo_mapper' do
|
|||
require 'logger'
|
||||
require 'spec_helper'
|
||||
|
||||
before(:all) do
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each { |f| require File.expand_path(f) }
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
end
|
||||
|
||||
before(:all) do
|
||||
config = {
|
||||
'test' => {
|
||||
'database' => "mongo_mapper_#{Process.pid}"
|
||||
|
|
|
@ -4,9 +4,11 @@ describe 'mongo_mapper' do
|
|||
require 'logger'
|
||||
require 'spec_helper'
|
||||
|
||||
before(:all) do
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each { |f| require File.expand_path(f) }
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongo_mapper/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
end
|
||||
|
||||
before(:all) do
|
||||
config = {
|
||||
'test' => {
|
||||
'database' => "mongo_mapper_#{Process.pid}"
|
||||
|
|
|
@ -4,11 +4,11 @@ describe 'mongoid' do
|
|||
require 'logger'
|
||||
require 'spec_helper'
|
||||
|
||||
before(:all) do
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongoid/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
end
|
||||
|
||||
before(:all) do
|
||||
# if you want to see the statements while running the spec enable the following line
|
||||
# Mongoid.logger = Logger.new(STDERR)
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ describe 'mongoid' do
|
|||
require 'logger'
|
||||
require 'spec_helper'
|
||||
|
||||
before(:all) do
|
||||
Dir[File.dirname(__FILE__) + "/../../models/mongoid/*.rb"].sort.each do |f|
|
||||
require File.expand_path(f)
|
||||
end
|
||||
|
||||
before(:all) do
|
||||
# if you want to see the statements while running the spec enable the following line
|
||||
# Mongoid.logger = Logger.new(STDERR)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue