Skip to content

Commit

Permalink
test: use important information to name
Browse files Browse the repository at this point in the history
The method is only for JSON.
  • Loading branch information
kou committed Dec 13, 2012
1 parent 7cdf3ca commit 4775079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def teardown
data(:console => "console", :html => "html", :json => "json")
def test_output(output_type)
actual_result = run_analyzer("--reporter", output_type, @query_log_path)
actual_result = normalize_time(actual_result) if output_type == "json"
actual_result = normalize_json(actual_result) if output_type == "json"

expected_result = expected_analyzed_query("#{output_type}.expected")
assert_equal(expected_result, actual_result)
Expand All @@ -59,7 +59,7 @@ def run_analyzer(*arguments)
@output.string
end

def normalize_time(json_string)
def normalize_json(json_string)
json_string = json_string.gsub(/(\"start_time\"):\d+/,
"\\1:START_TIME")
json_string.gsub(/(\"last_time\"):\d+/, "\\1:LAST_TIME")
Expand Down

0 comments on commit 4775079

Please sign in to comment.