Sha256: 2155d10d7c776cc91579a6727428e0c62ee77d76ed0339993ef194c0678d754f

Contents?: true

Size: 882 Bytes

Versions: 6

Compression:

Stored size: 882 Bytes

Contents

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

describe "Kernel#caller" do
  it "should be able to determine caller info" do
    __caller_info__.should be_kind_of(Array)
  end

  it "should be able to get caller lines" do
    i = 0
    __caller_lines__(__caller_info__[0], __caller_info__[1], 4) { i += 1 }
    i.should == 9
  end
end



describe "Kernel#extract_options_from_args!" do
  it "should extract options from args" do
    args = ["foo", "bar", {:baz => :bar}]
    Kernel.extract_options_from_args!(args).should == {:baz => :bar}
    args.should == ["foo", "bar"]
  end
end



describe "Kernel#debugger" do
  it "should throw a useful error if there's no debugger" do
    Merb.logger.should_receive(:info!).with "\n***** Debugger requested, but was not " +
      "available: Start server with --debugger " +
      "to enable *****\n"
    Kernel.debugger
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec10/private/core_ext/kernel_spec.rb
merb-core-1.1.2 spec10/private/core_ext/kernel_spec.rb
merb-core-1.1.1 spec10/private/core_ext/kernel_spec.rb
merb-core-1.1.0 spec10/private/core_ext/kernel_spec.rb
merb-core-1.1.0.rc1 spec10/private/core_ext/kernel_spec.rb
merb-core-1.1.0.pre spec10/private/core_ext/kernel_spec.rb