Sha256: 43cc7cffb2981d28ab54664296b752090c75b057f343cb09e075011f3a136bbb

Contents?: true

Size: 727 Bytes

Versions: 4

Compression:

Stored size: 727 Bytes

Contents

require 'spec_helper'

describe LXC::Configuration do
  it 'parses config data' do
    conf = LXC::Configuration.new(fixture('configuration.txt')) 
    conf.content.should be_a Hash
    conf.attributes.should be_an Array
    conf.attributes.should_not be_empty
    conf.utsname.should_not be_nil
    conf['utsname'].should_not be_nil
    conf[:utsname].should_not be_nil
    conf.network_ipv4.should_not be_nil
  end

  it 'saves config data into file' do
    conf = LXC::Configuration.new(fixture('configuration.txt')) 
    conf.save_to_file('/tmp/lxc.txt')
    c1 = LXC::Configuration.new(fixture('configuration.txt')) 
    c2 = LXC::Configuration.new(File.read('/tmp/lxc.txt'))
    c1.content.should eq(c2.content)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lxc-ruby-0.2.3 spec/configuration_spec.rb
lxc-ruby-0.2.2 spec/configuration_spec.rb
lxc-ruby-0.2.1 spec/configuration_spec.rb
lxc-ruby-0.2.0 spec/configuration_spec.rb