From 3ad3c691cc58d24d7348599e9c4c4c9dd8b4c349 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 4 Feb 2014 10:06:28 +0000 Subject: [PATCH] replace shoulda context "#number_of_rows_on_project" at GanttHelperTest git-svn-id: http://svn.redmine.org/redmine/trunk@12789 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/helpers/gantt_test.rb | 33 ++++++++++----------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb index 49d11a7ac..dfcc9c8f6 100644 --- a/test/unit/lib/redmine/helpers/gantt_test.rb +++ b/test/unit/lib/redmine/helpers/gantt_test.rb @@ -90,26 +90,23 @@ class Redmine::Helpers::GanttHelperTest < ActionView::TestCase assert @gantt.truncated end - context "#number_of_rows_on_project" do - setup do - create_gantt - end - - should "count 0 for an empty the project" do - assert_equal 0, @gantt.number_of_rows_on_project(@project) - end + test "#number_of_rows_on_project should count 0 for an empty the project" do + create_gantt + assert_equal 0, @gantt.number_of_rows_on_project(@project) + end - should "count the number of issues without a version" do - @project.issues << Issue.generate!(:project => @project, :fixed_version => nil) - assert_equal 2, @gantt.number_of_rows_on_project(@project) - end + test "#number_of_rows_on_project should count the number of issues without a version" do + create_gantt + @project.issues << Issue.generate!(:project => @project, :fixed_version => nil) + assert_equal 2, @gantt.number_of_rows_on_project(@project) + end - should "count the number of issues on versions, including cross-project" do - version = Version.generate! - @project.versions << version - @project.issues << Issue.generate!(:project => @project, :fixed_version => version) - assert_equal 3, @gantt.number_of_rows_on_project(@project) - end + test "#number_of_rows_on_project should count the number of issues on versions, including cross-project" do + create_gantt + version = Version.generate! + @project.versions << version + @project.issues << Issue.generate!(:project => @project, :fixed_version => version) + assert_equal 3, @gantt.number_of_rows_on_project(@project) end # TODO: more of an integration test -- 2.39.5