diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 21:53:23 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 23:00:55 +0300 |
commit | 026e988544f282c87afec9a85ff21a23877f6226 (patch) | |
tree | 91dde48a6b9afc7937b1c9b20815842be6c26408 /spec/helpers/diff_helper_spec.rb | |
parent | 5bb743efec0043d79ac508503c9e28bee5fae48f (diff) |
Even more hound fixes
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec/helpers/diff_helper_spec.rb')
-rw-r--r-- | spec/helpers/diff_helper_spec.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb index 75da43a68a6..5bd09793b11 100644 --- a/spec/helpers/diff_helper_spec.rb +++ b/spec/helpers/diff_helper_spec.rb @@ -10,7 +10,7 @@ describe DiffHelper do describe 'diff_hard_limit_enabled?' do it 'should return true if param is provided' do - allow(controller).to receive(:params) { { :force_show_diff => true } } + allow(controller).to receive(:params) { { force_show_diff: true } } expect(diff_hard_limit_enabled?).to be_truthy end @@ -21,7 +21,7 @@ describe DiffHelper do describe 'allowed_diff_size' do it 'should return hard limit for a diff if force diff is true' do - allow(controller).to receive(:params) { { :force_show_diff => true } } + allow(controller).to receive(:params) { { force_show_diff: true } } expect(allowed_diff_size).to eq(1000) end @@ -32,13 +32,15 @@ describe DiffHelper do describe 'parallel_diff' do it 'should return an array of arrays containing the parsed diff' do - expect(parallel_diff(diff_file, 0)).to match_array(parallel_diff_result_array) + expect(parallel_diff(diff_file, 0)). + to match_array(parallel_diff_result_array) end end describe 'generate_line_code' do it 'should generate correct line code' do - expect(generate_line_code(diff_file.file_path, diff_file.diff_lines.first)).to eq('2f6fcd96b88b36ce98c38da085c795a27d92a3dd_6_6') + expect(generate_line_code(diff_file.file_path, diff_file.diff_lines.first)). + to eq('2f6fcd96b88b36ce98c38da085c795a27d92a3dd_6_6') end end @@ -55,12 +57,13 @@ describe DiffHelper do describe 'diff_line_content' do it 'should return non breaking space when line is empty' do - expect(diff_line_content(nil)).to eq(" ") + expect(diff_line_content(nil)).to eq(' ') end it 'should return the line itself' do - expect(diff_line_content(diff_file.diff_lines.first.text)).to eq("@@ -6,12 +6,18 @@ module Popen") - expect(diff_line_content(diff_file.diff_lines.first.type)).to eq("match") + expect(diff_line_content(diff_file.diff_lines.first.text)). + to eq('@@ -6,12 +6,18 @@ module Popen') + expect(diff_line_content(diff_file.diff_lines.first.type)).to eq('match') expect(diff_line_content(diff_file.diff_lines.first.new_pos)).to eq(6) end end |