Sha256: 144b067613e3967a93212dfd09e6ca95cd067c7cb6d934a632bb331483e7036e
Contents?: true
Size: 459 Bytes
Versions: 7
Compression:
Stored size: 459 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe ::File do describe '.binary?' do it 'detects a non-binary text file' do expect(File.binary?('spec/test_out/test2.rb')).to be(false) end it 'detects a binary image' do expect(File.binary?('spec/test_out/image.png')).to be(true) end it 'recognizes json as text' do expect(File.binary?('spec/test_out/doing.sublime-project')).to be(false) end end end
Version data entries
7 entries across 7 versions & 1 rubygems