Sha256: 3a5fbd6a7756e4aaa436c76073a38c7630ed1750a7560c70aaf66aaed03ffb94

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Debug do

    let(:described) { Vedeu::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 # Vedeu

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vedeu-0.6.7 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.6 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.5 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.4 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.3 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.2 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.1 test/lib/vedeu/log/debug_test.rb
vedeu-0.6.0 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.13 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.12 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.11 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.10 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.9 test/lib/vedeu/log/debug_test.rb
vedeu-0.5.8 test/lib/vedeu/log/debug_test.rb