Sha256: 38c060e8affd7655c27cd09b380f1b7096b64c2409b87c11386f23e50b01a547
Contents?: true
Size: 793 Bytes
Versions: 3
Compression:
Stored size: 793 Bytes
Contents
require 'helper' class TestHelper include Licensee::ContentHelper end class TestLicenseeContentHelper < Minitest::Test def setup @helper = TestHelper.new end def normalize(content) @helper.normalize_content(content) end should "downcase content" do assert_equal "foo", normalize("Foo") end should "strip leading whitespace" do assert_equal "foo", normalize("\n Foo") end should "strip trailing whitespace" do assert_equal "foo", normalize("Foo \n ") end should "strip double spaces" do assert_equal "foo bar", normalize("Foo bar") end should "strip copyrights" do assert_equal "foo", normalize("Copyright (c) 2015 Ben Balter\nFoo") end should "strip null bytes" do assert_equal "foo", normalize("\u0000Foo") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
licensee-5.0.0 | test/test_licensee_content_helper.rb |
licensee-5.0.0b7 | test/test_licensee_content_helper.rb |
licensee-5.0.0b6 | test/test_licensee_content_helper.rb |