geopolitical 0.9.3 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,6 +92,19 @@ describe City, type: :model do
92
92
  expect(City.new(name: '')).not_to be_valid
93
93
  end
94
94
  end
95
+
96
+ describe 'sorting' do
97
+ let(:cities) { [City.make!(name: 'Abadia', souls: 500),
98
+ City.make!(name: 'Xangrilá', souls: 5000)] }
99
+
100
+ it 'should sort by name' do
101
+ expect(City.ordered).to eq cities
102
+ end
103
+
104
+ it 'should sort by pop' do
105
+ expect(City.population).to eq cities.reverse
106
+ end
107
+ end
95
108
  end
96
109
 
97
110
  # it { should have_indices :name, :geom, :area, [:region_id, :nation_id] }
data/spec/spec_helper.rb CHANGED
@@ -19,6 +19,8 @@ Fabrication.configure do |config|
19
19
  config.path_prefix = Rails.root.join('../../')
20
20
  end
21
21
 
22
+ puts "Running Mongoid v#{Mongoid::VERSION}"
23
+
22
24
  RSpec.configure do |config|
23
25
  # ## Mock Framework
24
26
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geopolitical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Piccinini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -48,6 +48,7 @@ files:
48
48
  - ".coveralls.yml"
49
49
  - ".gitignore"
50
50
  - ".rspec"
51
+ - ".travis.yml"
51
52
  - Gemfile
52
53
  - Guardfile
53
54
  - MIT-LICENSE
@@ -163,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  version: '0'
164
165
  requirements: []
165
166
  rubyforge_project:
166
- rubygems_version: 2.4.7
167
+ rubygems_version: 2.4.8
167
168
  signing_key:
168
169
  specification_version: 4
169
170
  summary: Geopolitical models for mongoid.