Sha256: be6daff27bef755a5b9f5b051cdc3137c2660e234d3a21032bf9c66eb05c8e11

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

require 'spec_helper'

describe Earth do
  describe '.init' do
    before :all do
      Earth.init :all
    end

    it 'should require all Earth models' do
      lambda do
        Earth.resources.each { |k| k.constantize }
      end.should_not raise_error(NameError)
    end
  end

  describe '.resources' do
    it 'should get a list of all resource names' do
      Earth.init :all
      Earth.resources.length.should == 99
      Earth.resources.should include('Aircraft')
      Earth.resources.should include('Industry')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-1.0.3 spec/earth_spec.rb
earth-1.0.2 spec/earth_spec.rb
earth-1.0.1 spec/earth_spec.rb