Sha256: 9ccd5b79d759795f080490f15c0a29d7eabab8ca216219a21074de20fc4c0222

Contents?: true

Size: 484 Bytes

Versions: 15

Compression:

Stored size: 484 Bytes

Contents

require 'spec_helper'

describe Hexp::Node, 'pp' do
  subject { object.pp }

  context 'with no attributes or children' do
    let(:object) { H[:p, {}] }
    it { should == 'H[:p]'}
  end

  context 'with a single child' do
    let(:object) { H[:p, [ [:abbr, {title: 'YAGNI'}, "You ain't gonna need it"] ]] }
    it { should == %q^H[:p, [
                        H[:abbr, {"title"=>"YAGNI"}, [
                          "You ain't gonna need it"]]]]^.gsub(' '*22, '')
    }
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hexp-0.4.6 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.5 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.4 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.3 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.2 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.1 spec/unit/hexp/node/pp_spec.rb
hexp-0.4.0.beta1 spec/unit/hexp/node/pp_spec.rb
hexp-0.3.3 spec/unit/hexp/node/pp_spec.rb
hexp-0.3.2 spec/unit/hexp/node/pp_spec.rb
hexp-0.3.1 spec/unit/hexp/node/pp_spec.rb
hexp-0.3.0 spec/unit/hexp/node/pp_spec.rb
hexp-0.2.0 spec/unit/hexp/node/pp_spec.rb
hexp-0.0.1 spec/unit/hexp/node/pp_spec.rb
hexp-0.0.1.pre4 spec/unit/hexp/node/pp_spec.rb
hexp-0.0.1.pre3 spec/unit/hexp/node/pp_spec.rb