Sha256: 5e318d9c8dc92adb77331ce0f6c3dfd671f9e1290c020adc91bf16b3d12e81c8

Contents?: true

Size: 927 Bytes

Versions: 22

Compression:

Stored size: 927 Bytes

Contents

require 'spec_helper'
require 'puppet-debugger'
require 'puppet-debugger/plugin_test_helper'

describe :benchmark do
  include_examples 'plugin_tests'
  let(:args) { ["benchmark", "md5('12345')" ] }

  describe 'mode' do
    before(:each) do
      debugger.handle_input('benchmark') # enable
    end
    it 'enable' do
      debugger.handle_input("md5('12345')")
      expect(output.string).to match(/Benchmark\ Mode\ On/)
      expect(output.string).to match(/Time\ elapsed/)
    end
    it 'disable' do
      debugger.handle_input('benchmark') # disable
      expect(output.string).to match(/Benchmark\ Mode\ Off/)
    end
  end

  describe 'onetime' do
    it 'run' do
      debugger.handle_input("benchmark md5('12345')")
      expect(output.string).to_not match(/Benchmark\ Mode\ On/)
      expect(output.string).to_not match(/Benchmark\ Mode\ Off/)
      expect(output.string).to match(/Time\ elapsed/)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
puppet-debugger-0.19.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.18.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.17.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.16.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.15.2 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.15.1 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.15.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.14.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.13.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.12.3 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.12.2 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.12.1 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.12.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.11.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.10.3 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.10.2 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.10.1 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.10.0 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.9.1 spec/input_responders/benchmark_spec.rb
puppet-debugger-0.9.0 spec/input_responders/benchmark_spec.rb