Sha256: 473657c92c369eb8902f3d4a9fa66e0ce25d34f5644f015b9ccadc8198879799
Contents?: true
Size: 793 Bytes
Versions: 18
Compression:
Stored size: 793 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe ProxyTester::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 = ProxyTester::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 = ProxyTester::Data.new(config) result = data.lookup('pid_file') expect(result).to eq('/path/pid_file') end end end
Version data entries
18 entries across 18 versions & 1 rubygems