Sha256: f0c6cef3fd945c894664a637d5abbbc3e39648f550e2782ac994de8c55c0e92e

Contents?: true

Size: 556 Bytes

Versions: 3

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'
require 'debugging/q'

describe 'q' do
  it 'should output the same as p for a single arg' do
    Paint.unpaint(capture_stdout{q /some object/}).should ==
    capture_stdout{p /some object/}
  end

  it "should output the same as p but for multiple args one one line, values separated by two spaces" do
    Paint.unpaint(capture_stdout do
      q 1, "1", 2..5, [], {:hallo => :du}, nil, true
    end).chop.should ==
    capture_stdout do
      p 1, "1", 2..5, [], {:hallo => :du}, nil, true
    end.chop.gsub( "\n", '  ' )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
debugging-1.0.2 spec/q_spec.rb
debugging-1.0.1 spec/q_spec.rb
debugging-1.0.0 spec/q_spec.rb