Sha256: 985c4c93d171eb1e233f61d8af15e4f10d5457266dc62ea528cfea04a8c0a613

Contents?: true

Size: 782 Bytes

Versions: 14

Compression:

Stored size: 782 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 '.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 # Logging

end # Vedeu

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vedeu-0.6.21 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.20 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.19 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.18 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.17 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.16 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.15 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.14 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.13 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.12 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.11 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.10 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.9 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.8 test/lib/vedeu/logging/debug_test.rb