Sha256: 17cbb4a05f2ae495fbd6b41f399b98daf92f1ede07609f0194ab1160c4b5eae4
Contents?: true
Size: 572 Bytes
Versions: 18
Compression:
Stored size: 572 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Environment do context '#initialize' do it 'requires no arguments' do expect { Environment.new }.not_to raise_error end end context '#request_password' do it 'asks for password' do stderr = double(stderr) expect(stderr).to receive(:printf).with('Please enter password: ') stdin = double('stdin') expect(stdin).to receive(:readline).and_return('passwd') env = Environment.new(stdin, stderr) expect(env.password).to eq('passwd') end end end
Version data entries
18 entries across 18 versions & 1 rubygems