diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-17 20:56:10 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-19 21:47:38 -0300 |
commit | 3a3a386d4f6667c606fabdcb53c325e9d531d358 (patch) | |
tree | e185499917bf9e04b01f6d9c34347312c7d00f82 | |
parent | dcf7a166f231e58079fdd35a8dee814e1401f3d3 (diff) | |
download | rails-3a3a386d4f6667c606fabdcb53c325e9d531d358.tar.gz rails-3a3a386d4f6667c606fabdcb53c325e9d531d358.tar.bz2 rails-3a3a386d4f6667c606fabdcb53c325e9d531d358.zip |
Remove extra space assertion
No need to check that each line contains an extra space, just matching
the space in the regexp is enough to ensure that.
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index d535f51986..10e0d2568c 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -33,7 +33,7 @@ module ApplicationTests Dir.chdir(app_path) do output = `bundle exec rake notes` - lines = output.scan(/\[([0-9\s]+)\](\s)/) + lines = output.scan(/\[([0-9\s]+)\]\s/).flatten assert_match(/note in erb/, output) assert_match(/note in js/, output) @@ -47,8 +47,7 @@ module ApplicationTests assert_equal 9, lines.size lines.each do |line| - assert_equal 4, line[0].size - assert_equal ' ', line[1] + assert_equal 4, line.size end end end |