From: Toshi MARUYAMA Date: Tue, 30 Aug 2011 07:56:02 +0000 (+0000) Subject: remove trailing white-spaces from test/unit/lib/redmine/views/builders/json_test.rb. X-Git-Tag: 1.3.0~1170 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd4b19168a5cbd7a18b4db42691f12ec1ed624b0;p=redmine.git 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 --- diff --git a/test/unit/lib/redmine/views/builders/json_test.rb b/test/unit/lib/redmine/views/builders/json_test.rb index 8550a506b..1f09f3718 100644 --- a/test/unit/lib/redmine/views/builders/json_test.rb +++ b/test/unit/lib/redmine/views/builders/json_test.rb @@ -1,16 +1,16 @@ # 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 # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -18,7 +18,7 @@ require File.expand_path('../../../../../../test_helper', __FILE__) class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase - + def test_hash assert_json_output({'person' => {'name' => 'Ryan', 'age' => 32}}) do |b| b.person do @@ -27,7 +27,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end end end - + def test_hash_hash assert_json_output({'person' => {'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b| b.person do @@ -35,7 +35,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase b.birth :city => 'London', :country => 'UK' end end - + assert_json_output({'person' => {'id' => 1, 'name' => 'Ryan', 'birth' => {'city' => 'London', 'country' => 'UK'}}}) do |b| b.person :id => 1 do b.name 'Ryan' @@ -43,7 +43,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end end end - + def test_array assert_json_output({'books' => [{'title' => 'Book 1', 'author' => 'B. Smith'}, {'title' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b| b.array :books do |b| @@ -63,7 +63,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end end end - + def test_array_with_content_tags assert_json_output({'books' => [{'value' => 'Book 1', 'author' => 'B. Smith'}, {'value' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b| b.array :books do |b| @@ -72,7 +72,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end end end - + def assert_json_output(expected, &block) builder = Redmine::Views::Builders::Json.new block.call(builder)