Sha256: 3a5fbd6a7756e4aaa436c76073a38c7630ed1750a7560c70aaf66aaed03ffb94
Contents?: true
Size: 696 Bytes
Versions: 14
Compression:
Stored size: 696 Bytes
Contents
require 'test_helper' module Vedeu describe Debug do let(:described) { Vedeu::Debug } before do File.stubs(:open).with('/tmp/profile.html', 'w').returns(:some_code) end describe '.debug' do let(:filename) { 'profile.html' } let(:some_code) { :some_code } context 'when the block is not given' do subject { described.debug(filename) } it { subject.must_equal(nil) } end context 'when the block is given' do subject { described.debug(filename) { some_code } } it { ::File.expects(:open).with('/tmp/profile.html', 'w') subject } end end end # Debug end # Vedeu
Version data entries
14 entries across 14 versions & 1 rubygems