Permalink
Browse files

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.
  • Loading branch information...
1 parent dcf7a16 commit 3a3a386d4f6667c606fabdcb53c325e9d531d358 @carlosantoniodasilva carlosantoniodasilva committed Mar 17, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 railties/test/application/rake/notes_test.rb
@@ -33,7 +33,7 @@ def teardown
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 @@ def teardown
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

0 comments on commit 3a3a386

Please sign in to comment.