Sha256: 22c4ff22b6e2bd18dcc853a3d1c7fdbb21ea92729250add234d666e67ba65998
Contents?: true
Size: 1.19 KB
Versions: 32
Compression:
Stored size: 1.19 KB
Contents
require 'rails_spec_helper' describe 'AppMap tracer via Railtie' do include_context 'Rails app pg database', 'spec/fixtures/rails5_users_app' do let(:env) { {} } let(:cmd) { %(docker-compose run --rm -e RAILS_ENV=development -e APPMAP app ./bin/rails r "puts AppMap.instance_variable_get('@configuration').nil?") } let(:command_capture2) do require 'open3' Open3.capture3(env, cmd, chdir: fixture_dir).tap do |result| unless result[2] == 0 warn <<~STDERR Failed to run rails5_users_app container <<< Output: #{result[0]} #{result[1]} >>> End of output STDERR raise 'Failed to run rails5_users_app container' end end end let(:command_output) { command_capture2[0].strip } let(:command_result) { command_capture2[2] } describe 'with APPMAP=false' do let(:env) { { 'APPMAP' => 'false' } } it 'is disabled' do expect(command_output).to eq('true') end end describe 'with APPMAP=true' do let(:env) { { 'APPMAP' => 'true' } } it 'is enabled' do expect(command_output).to eq('false') end end end end
Version data entries
32 entries across 32 versions & 1 rubygems