remove trailing white-spaces from test/unit/lib/redmine/views/builders/json_test.rb.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6792 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-08-30 07:56:02 +00:00
parent 6c4da86c5d
commit fd4b19168a
1 changed files with 9 additions and 9 deletions

View File

@ -1,16 +1,16 @@
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2010 Jean-Philippe Lang # Copyright (C) 2006-2011 Jean-Philippe Lang
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@ -18,7 +18,7 @@
require File.expand_path('../../../../../../test_helper', __FILE__) require File.expand_path('../../../../../../test_helper', __FILE__)
class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
def test_hash def test_hash
assert_json_output({'person' => {'name' => 'Ryan', 'age' => 32}}) do |b| assert_json_output({'person' => {'name' => 'Ryan', 'age' => 32}}) do |b|
b.person do b.person do
@ -27,7 +27,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
end end
end end
end end
def test_hash_hash def test_hash_hash
assert_json_output({'person' => {'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b| assert_json_output({'person' => {'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b|
b.person do b.person do
@ -35,7 +35,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
b.birth :city => 'London', :country => 'UK' b.birth :city => 'London', :country => 'UK'
end end
end end
assert_json_output({'person' => {'id' => 1, 'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b| assert_json_output({'person' => {'id' => 1, 'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b|
b.person :id => 1 do b.person :id => 1 do
b.name 'Ryan' b.name 'Ryan'
@ -43,7 +43,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
end end
end end
end end
def test_array def test_array
assert_json_output({'books' => [{'title' => 'Book 1', 'author' => 'B. Smith'}, {'title' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b| assert_json_output({'books' => [{'title' => 'Book 1', 'author' => 'B. Smith'}, {'title' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b|
b.array :books do |b| b.array :books do |b|
@ -63,7 +63,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
end end
end end
end end
def test_array_with_content_tags def test_array_with_content_tags
assert_json_output({'books' => [{'value' => 'Book 1', 'author' => 'B. Smith'}, {'value' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b| assert_json_output({'books' => [{'value' => 'Book 1', 'author' => 'B. Smith'}, {'value' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b|
b.array :books do |b| b.array :books do |b|
@ -72,7 +72,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
end end
end end
end end
def assert_json_output(expected, &block) def assert_json_output(expected, &block)
builder = Redmine::Views::Builders::Json.new builder = Redmine::Views::Builders::Json.new
block.call(builder) block.call(builder)