Sha256: fb386a844f43df570f5c036a880b448eee45a42732caf1eb096518d8075ebc41

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe EasyProfiler::NoProfileInstance do
  it 'should receive name and options in initialize' do
    profiler = EasyProfiler::NoProfileInstance.new('myprofiler1')
    profiler.name.should == 'myprofiler1'
    profiler.config.should be(EasyProfiler.configuration)

    profiler = EasyProfiler::NoProfileInstance.new('myprofiler2', { :print_limit => 100 })
    profiler.name.should == 'myprofiler2'
    profiler.config.print_limit.should == 100
  end

  it 'should respond to :progress' do
    profiler = EasyProfiler::NoProfileInstance.new('myprofiler')
    profiler.should respond_to(:progress)
    lambda {
      profiler.progress('message')
    }.should_not raise_error
  end

  it 'should respond to :debug' do
    profiler = EasyProfiler::NoProfileInstance.new('myprofiler')
    profiler.should respond_to(:debug)
    lambda {
      profiler.debug('message')
    }.should_not raise_error
  end

  it 'should respond to :dump_results' do
    profiler = EasyProfiler::NoProfileInstance.new('myprofiler')
    profiler.should respond_to(:dump_results)
    lambda {
      profiler.dump_results
    }.should_not raise_error
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
easy-prof-1.1.2 spec/no_profile_instance_spec.rb
easy-prof-1.1.1 spec/no_profile_instance_spec.rb
easy-prof-1.1.0 spec/no_profile_instance_spec.rb
easy-prof-1.0.0 spec/no_profile_instance_spec.rb