Sha256: ce8fe16a8b8f9851276ac9ed8949b06a6749c46c4a89231393bcf6edc76dd890
Contents?: true
Size: 791 Bytes
Versions: 6
Compression:
Stored size: 791 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 do ::File.expects(:open).with('/tmp/profile.html', 'w') subject end end end end # Debug end # Logging end # Vedeu
Version data entries
6 entries across 6 versions & 1 rubygems