compiled_license/spec/compiled_license_spec.cr

24 lines
544 B
Crystal
Raw Permalink Normal View History

2021-10-23 10:17:50 +00:00
require "spec"
require "../src/compiled_license"
2018-02-20 03:46:14 +00:00
describe CompiledLicense do
2021-10-23 10:17:50 +00:00
licenses = CompiledLicense::LICENSES
2018-02-20 03:46:14 +00:00
2018-02-20 07:07:01 +00:00
it "should return string" do
(licenses.size > 20).should be_true
end
it "should include license of current file" do
2021-10-23 10:17:50 +00:00
licenses.should contain("compiled_license")
2018-02-20 07:07:01 +00:00
end
it "should contain name of author from license file" do
licenses.should contain("Isaac Sloan")
end
it "should contain more than one license" do
delimiter = "\n\n"
2021-10-23 10:17:50 +00:00
(licenses.split(delimiter).size > 1).should be_true
2018-02-20 03:46:14 +00:00
end
end