Sha256: d6cef44e70834fa6599543da5e82e735f63336a2bf3192717dcf85b201220193

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'
Dir[File.dirname(__FILE__) + '/../shared/*.rb'].each {|file| require file }

describe 'Mongoid' do

  before(:all) do
    DATABASE_NAME = "mongoid_#{Process.pid}"
    # Moped.logger = Logger.new(STDOUT)

    Mongoid.configure do |config|
      config.connect_to DATABASE_NAME
    end

    load File.dirname(__FILE__) + '/../../fixtures/mongoid/models.rb'
    load File.dirname(__FILE__) + '/../../fixtures/shared/seeds.rb'
  end

  after(:all) do
    Mongoid.purge!
  end

  it_behaves_like 'between_times'
  it_behaves_like 'between_dates'
  it_behaves_like 'at_time'
  it_behaves_like 'offset parameter'
  it_behaves_like 'order parameter'
  it_behaves_like 'index_scope parameter'
  it_behaves_like 'by day'
  it_behaves_like 'by direction'
  it_behaves_like 'by fortnight'
  it_behaves_like 'by month'
  it_behaves_like 'by calendar month'
  it_behaves_like 'by quarter'
  it_behaves_like 'by week'
  it_behaves_like 'by cweek'
  it_behaves_like 'by weekend'
  it_behaves_like 'by year'
  it_behaves_like 'relative'
end if testing_mongoid?

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
ta_by_star-4.1.0 spec/integration/mongoid/mongoid_spec.rb
ta_by_star-4.0.0 spec/integration/mongoid/mongoid_spec.rb
by_star-4.0.0 spec/integration/mongoid/mongoid_spec.rb