Sha256: c80164a1bd2a38858f768bcad266e1361778f81775a278e21aedaab6eeb70a95
Contents?: true
Size: 1.02 KB
Versions: 14
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe VisualizeAws do let(:opts) { { :source_file => source_file, :filename => temp_file } } let(:source_file) { File.join(File.dirname(__FILE__), 'dummy.json') } let(:config) { AwsConfig.new({groups: {'0.0.0.0/0' => '*'}}) } context 'json to dot file' do let(:expected_file) { File.join(File.dirname(__FILE__), 'dummy.dot') } let(:temp_file) { Tempfile.new(%w(aws .dot)) } it 'should parse json input', :integration => true do VisualizeAws.new(config, opts).unleash(temp_file.path) expect(File.read(expected_file)).to eq(temp_file.read) end end context 'json to json file' do let(:expected_file) { File.join(File.dirname(__FILE__), 'expected.json') } let(:temp_file) { Tempfile.new(%w(aws .json)) } it 'should parse json input', :integration => true do expect(FileUtils).to receive(:copy) VisualizeAws.new(config, opts).unleash(temp_file.path) expect(File.read(expected_file)).to eq(temp_file.read) end end end
Version data entries
14 entries across 14 versions & 1 rubygems