2015-09-21 09:51:00 +02:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
require 'helper'
|
|
|
|
require 'vulcano/resource'
|
|
|
|
|
2015-09-21 12:30:58 +02:00
|
|
|
describe 'Vulcano::Resources::JSON' do
|
2015-09-22 18:31:21 +02:00
|
|
|
resource = load_resource('json', 'policyfile.lock.json')
|
2015-09-21 09:51:00 +02:00
|
|
|
|
2015-09-22 18:33:05 +02:00
|
|
|
it 'verify json parsing' do
|
|
|
|
_(resource.params).wont_equal nil
|
|
|
|
_(resource.send('name')).must_equal 'demo'
|
|
|
|
_(resource.send('run_list')).must_equal %w{apache2 omnibus}
|
|
|
|
_(resource.send('cookbook_locks.omnibus.version')).must_equal '2.2.0'
|
2015-09-21 09:51:00 +02:00
|
|
|
end
|
|
|
|
end
|