Sha256: 542677dd510d8e5d2d2abc4aceb9e8800b52da198c456a4aae5b9fa00563b4b2

Contents?: true

Size: 652 Bytes

Versions: 21

Compression:

Stored size: 652 Bytes

Contents

asset_directory = File.expand_path('../../../../assets', __FILE__)
asset_file_paths = Dir.glob(File.join(asset_directory, 'message-bus.js'))
asset_file_names = asset_file_paths.map{|e| File.basename(e) }

describe asset_file_names do
  it 'should contain .js files' do
    expect(asset_file_names).to include('message-bus.js')
  end
end

asset_file_paths.each do | path |
  describe "Asset file #{File.basename(path).inspect}" do
    it 'should be encodable as UTF8' do
      binary_data = File.open(path, 'rb'){|f| f.read }
      encode_block = -> { binary_data.encode(Encoding::UTF_8) }
      expect(encode_block).not_to raise_error
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
message_bus-1.1.1 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.1.0 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.16 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.15 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.14 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.13 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.12 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.11 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.10 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.9 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.8 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.7 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.6 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.5 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.4 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.3 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.2 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.1 spec/lib/assets/asset_encoding_spec.rb
message_bus-1.0.0 spec/lib/assets/asset_encoding_spec.rb
message_bus-0.9.6 spec/lib/assets/asset_encoding_spec.rb