Sha256: 99891f03b3eb4445ebf2c398d0684c3f6d195def01d86c493e2d53bb752ba52d
Contents?: true
Size: 665 Bytes
Versions: 10
Compression:
Stored size: 665 Bytes
Contents
require 'spec_helper' require 'binary_data_checker' describe Mirage::BinaryDataChecker do include_context :resources it 'should find binary data' do BinaryDataChecker.contains_binary_data?(File.read("#{resources_dir}/binary.file")).should == true end it 'should not find binary data' do BinaryDataChecker.contains_binary_data?("string").should == false end it 'should clean up the temporary file created when checking string content' do tmpfile = Tempfile.new("file") Tempfile.should_receive(:new).and_return tmpfile FileUtils.should_receive(:rm).with(tmpfile.path) BinaryDataChecker.contains_binary_data?("string") end end
Version data entries
10 entries across 10 versions & 2 rubygems