diff --git a/.Gemfile.lock.swp b/.Gemfile.lock.swp deleted file mode 100644 index 20d3e7e9..00000000 Binary files a/.Gemfile.lock.swp and /dev/null differ diff --git a/test/controllers/recurring_todos_controller_test.rb b/test/controllers/recurring_todos_controller_test.rb index 7ce7f335..6c1d8a17 100644 --- a/test/controllers/recurring_todos_controller_test.rb +++ b/test/controllers/recurring_todos_controller_test.rb @@ -224,7 +224,7 @@ class RecurringTodosControllerTest < ActionController::TestCase assert_equal UserTime.new(user).midnight(target_date), new_todo.due # show_from should be nil since now+4.days-10.days is in the past - assert_equal nil, new_todo.show_from + assert_nil new_todo.show_from end def test_last_sunday_of_march diff --git a/test/controllers/todos_controller_test.rb b/test/controllers/todos_controller_test.rb index 1781a0b0..ec203975 100644 --- a/test/controllers/todos_controller_test.rb +++ b/test/controllers/todos_controller_test.rb @@ -32,9 +32,9 @@ class TodosControllerTest < ActionController::TestCase p.save! login_as(:admin_user) get :index - assert_equal nil, assigns['project_not_done_counts'][projects(:timemachine).id] + assert_nil assigns['project_not_done_counts'][projects(:timemachine).id] assert_equal 2, assigns['context_not_done_counts'][contexts(:call).id] - assert_equal nil, assigns['context_not_done_counts'][contexts(:lab).id] + assert_nil assigns['context_not_done_counts'][contexts(:lab).id] end def test_not_done_counts_after_hiding_project diff --git a/test/models/recurring_todo_test.rb b/test/models/recurring_todo_test.rb index 79ef192f..8a59bf39 100644 --- a/test/models/recurring_todo_test.rb +++ b/test/models/recurring_todo_test.rb @@ -30,8 +30,8 @@ class RecurringTodoTest < ActiveSupport::TestCase @every_day.target='show_from_date' # when recurrence is targeted on show_from, due date should remain nil - assert_equal nil, @every_day.get_due_date(nil) - assert_equal nil, @every_day.get_due_date(@today-3.days) + assert_nil @every_day.get_due_date(nil) + assert_nil @every_day.get_due_date(@today-3.days) # check show from get the next day assert_equal_dmy @today, @every_day.get_show_from_date(@today-1.days) @@ -40,7 +40,7 @@ class RecurringTodoTest < ActiveSupport::TestCase @every_day.target='due_date' # when target on due_date, show_from is relative to due date unless show_always is true @every_day.show_always = true - assert_equal nil, @every_day.get_show_from_date(@today-1.days) + assert_nil @every_day.get_show_from_date(@today-1.days) @every_day.show_always = false @every_day.show_from_delta=10 @@ -52,7 +52,7 @@ class RecurringTodoTest < ActiveSupport::TestCase # when show_from is nil, show always (happend in tests) @every_day.show_from_delta=nil - assert_equal nil, @every_day.get_show_from_date(@today+9.days) + assert_nil @every_day.get_show_from_date(@today+9.days) # TODO: show_from has no use case for daily pattern. Need to test on # weekly/monthly/yearly diff --git a/test/models/rich_message_extractor_test.rb b/test/models/rich_message_extractor_test.rb index cecdbdcd..828234e6 100644 --- a/test/models/rich_message_extractor_test.rb +++ b/test/models/rich_message_extractor_test.rb @@ -21,7 +21,7 @@ class RichMessageExtractorTest < Minitest::Test extractor = RichMessageExtractor.new(message) assert_equal "ohai", extractor.description assert_equal "some-context", extractor.context - assert_equal nil, extractor.project + assert_nil extractor.project end def test_message_without_context @@ -37,7 +37,7 @@ class RichMessageExtractorTest < Minitest::Test extractor = RichMessageExtractor.new(message) assert_equal "ohai", extractor.description assert_equal "", extractor.context - assert_equal nil, extractor.project + assert_nil extractor.project end def test_message_without_anything @@ -45,7 +45,7 @@ class RichMessageExtractorTest < Minitest::Test extractor = RichMessageExtractor.new(message) assert_equal "", extractor.description assert_equal "", extractor.context - assert_equal nil, extractor.project + assert_nil extractor.project end def test_message_with_just_a_context @@ -53,7 +53,7 @@ class RichMessageExtractorTest < Minitest::Test extractor = RichMessageExtractor.new(message) assert_equal "", extractor.description assert_equal "some-context", extractor.context - assert_equal nil, extractor.project + assert_nil extractor.project end def test_message_with_tags @@ -65,7 +65,7 @@ class RichMessageExtractorTest < Minitest::Test def test_message_with_no_tags message = "no tags" extractor = RichMessageExtractor.new(message) - assert_equal nil, extractor.tags + assert_nil extractor.tags end def test_message_with_due_date @@ -77,7 +77,7 @@ class RichMessageExtractorTest < Minitest::Test def test_message_with_no_due_date message = "no date" extractor = RichMessageExtractor.new(message) - assert_equal nil, extractor.due + assert_nil extractor.due end def test_message_with_show_from @@ -89,7 +89,7 @@ class RichMessageExtractorTest < Minitest::Test def test_message_with_no_show_from message = "no tickler" extractor = RichMessageExtractor.new(message) - assert_equal nil, extractor.show_from + assert_nil extractor.show_from end def test_message_with_star