Commit afc17a41ccea49c72099bda8eb3cc049d38c01a9
1 parent
dcda9666
Exists in
master
and in
5 other branches
DRY test
Showing
2 changed files
with
15 additions
and
12 deletions
Show diff stats
test/geo_shape_test.rb
... | ... | @@ -28,7 +28,7 @@ class GeoShapeTest < Minitest::Test |
28 | 28 | coordinates: [[[10, 20], [15, 25], [20, 20], [20, 10], [10, 10], [10, 20]]] |
29 | 29 | } |
30 | 30 | } |
31 | - ], Region | |
31 | + ] | |
32 | 32 | end |
33 | 33 | |
34 | 34 | def test_circle |
... | ... | @@ -45,7 +45,7 @@ class GeoShapeTest < Minitest::Test |
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
48 | - }, Region | |
48 | + } | |
49 | 49 | end |
50 | 50 | |
51 | 51 | def test_envelope |
... | ... | @@ -58,7 +58,7 @@ class GeoShapeTest < Minitest::Test |
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |
61 | - }, Region | |
61 | + } | |
62 | 62 | end |
63 | 63 | |
64 | 64 | def test_polygon |
... | ... | @@ -71,7 +71,7 @@ class GeoShapeTest < Minitest::Test |
71 | 71 | } |
72 | 72 | } |
73 | 73 | } |
74 | - }, Region | |
74 | + } | |
75 | 75 | end |
76 | 76 | |
77 | 77 | def test_multipolygon |
... | ... | @@ -87,7 +87,7 @@ class GeoShapeTest < Minitest::Test |
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |
90 | - }, Region | |
90 | + } | |
91 | 91 | end |
92 | 92 | |
93 | 93 | def test_disjoint |
... | ... | @@ -101,7 +101,7 @@ class GeoShapeTest < Minitest::Test |
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
104 | - }, Region | |
104 | + } | |
105 | 105 | end |
106 | 106 | |
107 | 107 | def test_within |
... | ... | @@ -115,7 +115,7 @@ class GeoShapeTest < Minitest::Test |
115 | 115 | } |
116 | 116 | } |
117 | 117 | } |
118 | - }, Region | |
118 | + } | |
119 | 119 | end |
120 | 120 | |
121 | 121 | def test_search_math |
... | ... | @@ -128,7 +128,7 @@ class GeoShapeTest < Minitest::Test |
128 | 128 | } |
129 | 129 | } |
130 | 130 | } |
131 | - }, Region | |
131 | + } | |
132 | 132 | end |
133 | 133 | |
134 | 134 | def test_search_no_match |
... | ... | @@ -141,7 +141,7 @@ class GeoShapeTest < Minitest::Test |
141 | 141 | } |
142 | 142 | } |
143 | 143 | } |
144 | - }, Region | |
144 | + } | |
145 | 145 | end |
146 | 146 | |
147 | 147 | def test_contains |
... | ... | @@ -158,7 +158,7 @@ class GeoShapeTest < Minitest::Test |
158 | 158 | } |
159 | 159 | } |
160 | 160 | } |
161 | - }, Region | |
161 | + } | |
162 | 162 | end |
163 | 163 | |
164 | 164 | def test_latlon |
... | ... | @@ -171,7 +171,10 @@ class GeoShapeTest < Minitest::Test |
171 | 171 | } |
172 | 172 | } |
173 | 173 | } |
174 | - }, Region | |
174 | + } | |
175 | 175 | end |
176 | 176 | |
177 | + def default_model | |
178 | + Region | |
179 | + end | |
177 | 180 | end | ... | ... |
test/test_helper.rb