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.71 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.70 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.69 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.68 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.67 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.66 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.65 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.64 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.63 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.62 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.61 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.60 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.59 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.58 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.57 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.56 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.54 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.53 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.52 test/lib/vedeu/logging/debug_test.rb
vedeu-0.6.51 test/lib/vedeu/logging/debug_test.rb