Sha256: 3e538a582f5930f4c7a47934aa675421c477de0fb788bf7b360ddc9d18bdb93f
Contents?: true
Size: 784 Bytes
Versions: 28
Compression:
Stored size: 784 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe LocalPac::Data do context '#instance_binding' do it 'let you lookup variables' do config = Class.new(Module) do def pid_file '/path/pid_file' end end.new data = LocalPac::Data.new(config) # rubocop:disable Eval result = eval('lookup("pid_file")', data.instance_binding) # rubocop:enable Eval expect(result).to eq('/path/pid_file') end end context '#lookup' do it 'let you lookup variables' do config = Class.new(Module) do def pid_file '/path/pid_file' end end.new data = LocalPac::Data.new(config) result = data.lookup('pid_file') expect(result).to eq('/path/pid_file') end end end
Version data entries
28 entries across 28 versions & 1 rubygems