diff --git a/test/rocco_test.rb b/test/rocco_test.rb index 67c1da3..58597a8 100644 --- a/test/rocco_test.rb +++ b/test/rocco_test.rb @@ -86,22 +86,22 @@ class RoccoLanguageDetection < Test::Unit::TestCase def test_basic_detection r = Rocco.new( 'filename.py' ) { "" } if r.pygmentize? - assert_equal "python", r.detect_language(), "`detect_language()` should return the correct language" - assert_equal "python", r.options[:language], "`@options[:language]` should be set to the correct language" + assert_equal "python", r.detect_language(), "`detect_language()` should return the correct language" + assert_equal "python", r.options[:language], "`@options[:language]` should be set to the correct language" end end def test_fallback_default r = Rocco.new( 'filename.an_extension_with_no_meaning_whatsoever' ) { "" } if r.pygmentize? - assert_equal "ruby", r.detect_language(), "`detect_language()` should return `ruby` when nothing else is detected" - assert_equal "ruby", r.options[:language], "`@options[:language]` should be set to `ruby` when nothing else is detected" + assert_equal "text", r.detect_language(), "`detect_language()` should return `text` when nothing else is detected" + assert_equal "ruby", r.options[:language], "`@options[:language]` should be set to `ruby` when nothing else is detected" end end def test_fallback_user r = Rocco.new( 'filename.an_extension_with_no_meaning_whatsoever', '', { :language => "c" } ) { "" } if r.pygmentize? - assert_equal "c", r.detect_language(), "`detect_language()` should return the user's setting when nothing else is detected" - assert_equal "c", r.options[:language], "`@options[:language]` should be set to the user's setting when nothing else is detected" + assert_equal "text", r.detect_language(), "`detect_language()` should return `text` nothing else is detected" + assert_equal "c", r.options[:language], "`@options[:language]` should be set to the user's setting when nothing else is detected" end end end