Sha256: dc0e8fc2c01e13de5f496e1e88a5ce01130b7317168c58258c96783ee3d47fba

Contents?: true

Size: 576 Bytes

Versions: 8

Compression:

Stored size: 576 Bytes

Contents

require 'spec_helper'
require 'earth/model'

class FooBaloo < ActiveRecord::Base
  extend Earth::Model

  TABLE_STRUCTURE = "CREATE TABLE foo_baloos (id integer);"

  data_miner {}
end

describe Earth::Model do
  it 'manages its Schema' do
    expect { FooBaloo.create_table! }.not_to raise_error
  end
  it 'has SafeFinders' do
    FooBaloo.should respond_to(:safe_find_in_batches)
    FooBaloo.should respond_to(:safe_find_each)
  end

  describe '#registry' do
    it 'catalogues each Earth model' do
      Earth::Model.registry.should include(FooBaloo)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/model_spec.rb
earth-1.1.2 spec/earth/model_spec.rb
earth-1.1.1 spec/earth/model_spec.rb
earth-1.1.0 spec/earth/model_spec.rb
earth-1.0.3 spec/earth/model_spec.rb
earth-1.0.2 spec/earth/model_spec.rb
earth-1.0.1 spec/earth/model_spec.rb
earth-1.0.0 spec/earth/model_spec.rb