Sha256: e328f328744f0896779e801db81990624076c61061aa9d95e251e8197f06455b
Contents?: true
Size: 512 Bytes
Versions: 3
Compression:
Stored size: 512 Bytes
Contents
require 'spec_helper' require 'wgif/info_displayer' describe WGif::InfoDisplayer do let(:cache) { described_class.new } before do @mock_stdout = StringIO.new @real_stdout, $stdout = $stdout, @mock_stdout end after do $stdout = @real_stdout end it 'prints out a file size to the command line' do file_name = "fake_file_name.rb" File.stub(:size).with(file_name).and_return("1048576") cache.display(file_name) expect(@mock_stdout.string).to match(/1.000 MB/) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wgif-0.5.1 | spec/unit/wgif/info_displayer_spec.rb |
wgif-0.5.0 | spec/unit/wgif/info_displayer_spec.rb |
wgif-0.4.0 | spec/unit/wgif/info_displayer_spec.rb |