diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-17 21:08:03 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-19 21:47:38 -0300 |
commit | e0235c3721bf69be28f60819fa9695261fe387b5 (patch) | |
tree | 19c1a65a2d057c4124246cabb129a617e21a5a0d | |
parent | 29aff93dc4453cbe4c4cfa9e9c3dcf50338a6171 (diff) | |
download | rails-e0235c3721bf69be28f60819fa9695261fe387b5.tar.gz rails-e0235c3721bf69be28f60819fa9695261fe387b5.tar.bz2 rails-e0235c3721bf69be28f60819fa9695261fe387b5.zip |
Refactor assertion of line numbers matching 4 spaces
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index 5a104e2ffe..95087bf29f 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -39,10 +39,7 @@ module ApplicationTests assert_match(/note in ruby/, output) assert_equal 9, lines.size - - lines.each do |line| - assert_equal 4, line.size - end + assert_equal [4], lines.map(&:size).uniq end end @@ -64,10 +61,7 @@ module ApplicationTests assert_no_match(/note in some_other directory/, output) assert_equal 5, lines.size - - lines.each do |line_number| - assert_equal 4, line_number.size - end + assert_equal [4], lines.map(&:size).uniq end end @@ -90,10 +84,7 @@ module ApplicationTests assert_match(/note in some_other directory/, output) assert_equal 6, lines.size - - lines.each do |line_number| - assert_equal 4, line_number.size - end + assert_equal [4], lines.map(&:size).uniq end end @@ -118,10 +109,7 @@ module ApplicationTests assert_no_match(/note in app directory/, output) assert_equal 2, lines.size - - lines.each do |line_number| - assert_equal 4, line_number.size - end + assert_equal [4], lines.map(&:size).uniq end end |