Commit 1d4cd6f
committed
Fix intermittent test failures by not mutating global state
e.g.
https://ci.appveyor.com/project/bf4/active-model-serializers/build/415/job/qs8895cvla8fl0rf
1) Failure:
ActiveModel::Serializer::Adapter::JsonApi::RelationshipTest#test_relationship_including_data_explicit
[C:/projects/active-model-serializers/test/adapter/json_api/relationships_test.rb:186]:
--- expected
+++ actual
@@ -1 +1 @@
-{:data=>{:id=>"1337", :type=>"authors"}, :meta=>{:name=>"Dan Brown"}}
+{:data=>{:id=>"1337", :type=>"authors"
https://travis-ci.org/rails-api/active_model_serializers/jobs/156678147
1) Failure:
ActiveModel::Serializer::Adapter::JsonApi::RelationshipTest#test_relationship_with_everything
[/home/travis/build/rails-api/active_model_serializers/test/adapter/json_api/relationships_test.rb:200]:
--- expected
+++ actual
@@ -1 +1 @@
-{:data=>[{:id=>"1337", :type=>"likes"}],
:links=>{:related=>{:href=>"//example.com/likes/1337",
:meta=>{:ids=>"1337"}}}, :meta=>{:liked=>true}}
+{:data=>[{:id=>"1337", :type=>"likes"}],
:links=>{:related=>{:href=>"//example.com/likes/1337",
:meta=>{:ids=>"1337"}}}}1 parent d34069b commit 1d4cd6f
1 file changed
+39
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
118 | | - | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
122 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| |||
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
132 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| |||
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
145 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
157 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
165 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
176 | 192 | | |
177 | | - | |
| 193 | + | |
178 | 194 | | |
179 | 195 | | |
180 | 196 | | |
| |||
183 | 199 | | |
184 | 200 | | |
185 | 201 | | |
186 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
187 | 205 | | |
188 | 206 | | |
189 | 207 | | |
| |||
197 | 215 | | |
198 | 216 | | |
199 | 217 | | |
200 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
208 | 229 | | |
209 | 230 | | |
210 | 231 | | |
| |||
0 commit comments