1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-23 05:10:11 +01:00
choosealicense.com/spec/license_bom_spec.rb

14 lines
456 B
Ruby
Raw Normal View History

require 'spec_helper'
2016-02-08 15:37:19 -05:00
describe 'byte order marks' do
Dir["#{licenses_path}/*.html"].each do |file|
context "the #{File.basename(file, '.txt')} license" do
2016-02-08 15:37:19 -05:00
it 'does not begin with a byte order mark' do
bom = File.open(file).read.start_with?("\u0000EF\u0000BB\u0000BF")
msg = 'License file begins with a Byte Order Mark. See http://stackoverflow.com/a/1068700.'
2016-01-29 12:44:28 -05:00
expect(bom).to eql(false), msg
end
end
end
end