Navigation Menu

Skip to content

Commit

Permalink
test: extract common code
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 12, 2018
1 parent 2f28cfd commit 47a7c4a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/test-response-comparer.rb
Expand Up @@ -307,21 +307,19 @@ def test_different_order
end

class CareDifferencesInAccuracyOfPosition < self
def test_different_accurancy_of_postion
response1 = [
def create_response(value)
[
[
[1],
[["_id", "UInt32"], ["location", "float"]],
[1, 139.763570507358],
[1, value],
]
]
response2 = [
[
[1],
[["_id", "UInt32"], ["location", "float"]],
[1, 139.7635705073576],
],
]
end

def test_different_accurancy_of_postion
response1 = create_response(139.763570507358)
response2 = create_response(139.7635705073576)
assert do
same?(response1, response2, :care_order => false)
end
Expand Down

0 comments on commit 47a7c4a

Please sign in to comment.