Sha256: 10c76434d90d1162552419307df78b75b921a114189865e75886b67a1b4de93c
Contents?: true
Size: 575 Bytes
Versions: 24
Compression:
Stored size: 575 Bytes
Contents
require 'spec_helper' describe Cmds::ERBContext do let(:tpl) { <<-BLOCK defaults <% if current_host? %> -currentHost <%= current_host %> <% end %> export <%= domain %> <%= filepath %> BLOCK } def get_result tpl, bnd NRSER.squish ERB.new(tpl).result(bnd.get_binding) end it "should work" do bnd = Cmds::ERBContext.new [], current_host: 'xyz', domain: 'com.nrser.blah', filepath: '/tmp/export.plist' expect(get_result tpl, bnd).to eq "defaults -currentHost xyz export com.nrser.blah /tmp/export.plist" end end
Version data entries
24 entries across 24 versions & 1 rubygems