Sha256: d7024bf4e77f24300bce9cfac96fe464976cd36b2753cc4b029d1d90fceb65e9
Contents?: true
Size: 763 Bytes
Versions: 2
Compression:
Stored size: 763 Bytes
Contents
require 'spec_helper' describe LXC::Status do describe '.new' do let(:status) { LXC::Status.new('RUNNING', '12345') } it 'makes state downcase' do expect(status.state).to eq 'running' end it 'converts given pid into integer' do expect(status.pid).to be_an Integer end end describe '#to_hash' do let(:status) { LXC::Status.new('RUNNING', '12345') } it 'returns a hash representation' do result = status.to_hash expect(result).to be_a Hash expect(result).to include 'state', 'pid' end end describe '#to_s' do let(:status) { LXC::Status.new('RUNNING', '12345') } it 'returns a string representation' do expect(status.to_s).to eq 'state=running pid=12345' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lxc-ruby-0.3.2 | spec/status_spec.rb |
lxc-ruby-0.3.1 | spec/status_spec.rb |