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