Sha256: b5f374867905b7fd112746bb92d450eb4985bda729186722b83b686362ace77f

Contents?: true

Size: 570 Bytes

Versions: 6

Compression:

Stored size: 570 Bytes

Contents

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

    it 'defaults to {}' do
      sexpr([:lit, true]).tracking_markers.should eq({})
    end

    it 'can be installed through a private writer' do
      sexpr, markers = sexpr([:lit, true]), {:hello => "world"}
      sexpr.tracking_markers = markers
      sexpr.tracking_markers.should eq(markers)
    end

    it 'are installed through the second argument of sexpr' do
      markers = {:hello => "World"}
      sexpr([:lit, true], markers).tracking_markers.should eq(markers)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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