Sha256: 3ce70a90cfb7862ef88557a5f74d64d260704a297e3e58edac0634d6c1167eb9

Contents?: true

Size: 370 Bytes

Versions: 7

Compression:

Stored size: 370 Bytes

Contents

require 'spec_helper'
module Sexpr
  describe Node, "sexpr_body" do

    it 'returns the head' do
      sexpr([:lit, true]).sexpr_body.should eq([true])
    end

    it 'returns an empty array if no body' do
      sexpr([:lit]).sexpr_body.should eq([])
    end

    it 'is aliased as sexp_body' do
      sexpr([:lit, true]).sexp_body.should eq([true])
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sexpr-1.1.0 spec/unit/node/test_sexpr_body.rb
sexpr-1.0.0 spec/unit/node/test_sexpr_body.rb
sexpr-0.6.0 spec/unit/node/test_sexpr_body.rb
sexpr-0.5.1 spec/node/test_sexpr_body.rb
sexpr-0.5.0 spec/node/test_sexpr_body.rb
sexpr-0.4.0 spec/node/test_sexpr_body.rb
sexpr-0.3.0 spec/node/test_sexpr_body.rb