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

Version Path
vedeu-0.6.50 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.49 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.48 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.47 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.46 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.45 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.44 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.43 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.42 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.41 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.40 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.39 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.38 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.37 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.36 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.35 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.34 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.33 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.32 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.31 test/lib/vedeu/logging/debug_test.rb