Sha256: ee77a92f33e4f4ba9d9803d7c4c877aa1f16992c409d21178d0467d699aa03fb

Contents?: true

Size: 860 Bytes

Versions: 5

Compression:

Stored size: 860 Bytes

Contents

require 'helper'

class TestLicenseeLicense < Minitest::Test

  def setup
    @license = Licensee::License.new "MIT"
  end

  should "read the license body" do
    assert @license.body
    assert @license.text =~ /MIT/
  end

  should "read the license meta" do
    assert_equal "MIT License", @license.meta["title"]
  end

  should "know the license path" do
    assert_equal File.expand_path("./vendor/choosealicense.com/_licenses/mit.txt"), @license.path
  end

  should "know the license name" do
    assert_equal "MIT License", @license.name
  end

  should "know the license ID" do
    assert_equal "mit", @license.key
  end

  should "know if the license is featured" do
    assert @license.featured?
    refute Licensee::License.new("cc0").featured?
  end

  should "parse the license parts" do
    assert_equal 3, @license.send(:parts).size
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
licensee-4.1.2 test/test_licensee_license.rb
licensee-4.1.1 test/test_licensee_license.rb
licensee-4.1.0 test/test_licensee_license.rb
licensee-4.0.1 test/test_licensee_license.rb
licensee-4.0.0 test/test_licensee_license.rb