Sha256: 53cdf871251b201e81c95039b8ec412fe60928ba96438531248308e8c84b51a0
Contents?: true
Size: 303 Bytes
Versions: 4
Compression:
Stored size: 303 Bytes
Contents
module IOSpecHelper def pretend_file_not_exists(pattern) allow(IO).to receive(:read).and_wrap_original do |m, *a| # if this isn't a good use for case equality I don't know what is pattern === a.first ? raise(Errno::ENOENT) : m.call(*a) # rubocop:disable CaseEquality end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sequel-rails-1.1.1 | spec/helpers/io.rb |
sequel-rails-1.1.0 | spec/helpers/io.rb |
sequel-rails-1.0.1 | spec/helpers/io.rb |
sequel-rails-1.0.0 | spec/helpers/io.rb |