From b75ca18a67f5dc07384cde81e00935d778d0db19 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Thu, 15 Jun 2017 16:51:34 +0200 Subject: [PATCH] Make CodeRay.supported_languages tests Ruby 1.8 compatible. Ruby 1.8 (using Test::Unit) doesn't provide: * the assert_includes method; * the refute_includes method; * the refute method. --- test/functional/basic.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/functional/basic.rb b/test/functional/basic.rb index b6e2b603..441eec0a 100644 --- a/test/functional/basic.rb +++ b/test/functional/basic.rb @@ -161,32 +161,32 @@ def test_supported_languages_should_return_array_of_symbols end def test_supported_languages_should_include_languages - assert_includes CodeRay.supported_languages, :ruby + assert CodeRay.supported_languages.include?(:ruby) end def test_supported_languages_without_arguments_should_include_aliases_and_exclude_internals - assert_includes CodeRay.supported_languages, :javascript - refute_includes CodeRay.supported_languages, :debug + assert CodeRay.supported_languages.include?(:javascript) + assert !CodeRay.supported_languages.include?(:debug) end def test_supported_languages_with_arguments_should_include_aliases_and_exclude_internals - assert_includes CodeRay.supported_languages(true, false), :javascript - refute_includes CodeRay.supported_languages(true, false), :debug + assert CodeRay.supported_languages(true, false).include?(:javascript) + assert !CodeRay.supported_languages(true, false).include?(:debug) end def test_supported_languages_with_arguments_should_exclude_aliases_and_include_internals - refute_includes CodeRay.supported_languages(false, true), :javascript - assert_includes CodeRay.supported_languages(false, true), :debug + assert !CodeRay.supported_languages(false, true).include?(:javascript) + assert CodeRay.supported_languages(false, true).include?(:debug) end def test_supported_languages_with_arguments_should_include_aliases_and_internals - assert_includes CodeRay.supported_languages(true, true), :javascript - assert_includes CodeRay.supported_languages(true, true), :debug + assert CodeRay.supported_languages(true, true).include?(:javascript) + assert CodeRay.supported_languages(true, true).include?(:debug) end def test_supported_languages_with_arguments_should_exclude_aliases_and_internals - refute_includes CodeRay.supported_languages(false, false), :javascript - refute_includes CodeRay.supported_languages(false, false), :debug + assert !CodeRay.supported_languages(false, false).include?(:javascript) + assert !CodeRay.supported_languages(false, false).include?(:debug) end def test_token_kinds