# 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