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

Version Path
proxy_tester-0.1.10 spec/environment_spec.rb
proxy_tester-0.1.8 spec/environment_spec.rb
proxy_tester-0.1.6 spec/environment_spec.rb
proxy_tester-0.1.5 spec/environment_spec.rb
proxy_tester-0.1.4 spec/environment_spec.rb
proxy_tester-0.1.3 spec/environment_spec.rb
proxy_tester-0.1.2 spec/environment_spec.rb
proxy_tester-0.1.1 spec/environment_spec.rb
proxy_tester-0.1.0 spec/environment_spec.rb
proxy_tester-0.0.9 spec/environment_spec.rb
proxy_tester-0.0.8 spec/environment_spec.rb
proxy_tester-0.0.7 spec/environment_spec.rb
proxy_tester-0.0.6 spec/environment_spec.rb
proxy_tester-0.0.5 spec/environment_spec.rb
proxy_tester-0.0.4 spec/environment_spec.rb
proxy_tester-0.0.3 spec/environment_spec.rb
proxy_tester-0.0.2 spec/environment_spec.rb
proxy_tester-0.0.1 spec/environment_spec.rb