diff --git a/spec/docker_commander_spec.rb b/spec/docker_commander_spec.rb index d88992d..01d14c3 100644 --- a/spec/docker_commander_spec.rb +++ b/spec/docker_commander_spec.rb @@ -98,7 +98,7 @@ let(:container_name) { 'abcdef123' } it 'executes commands inside docker if container name is specified' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i abcdef123 bash -l -c "do stuff"') + expect(Fastlane::Actions).to receive(:sh).with('docker exec abcdef123 bash -l -c "do stuff"') docker_commander.exec(command: 'do stuff') end end diff --git a/spec/emulator_commander_spec.rb b/spec/emulator_commander_spec.rb index 6e0f0fb..707f071 100644 --- a/spec/emulator_commander_spec.rb +++ b/spec/emulator_commander_spec.rb @@ -5,9 +5,9 @@ describe '#disable_animations' do it 'disables emulator animation' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb shell settings put global window_animation_scale 0.0"') - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb shell settings put global transition_animation_scale 0.0"') - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb shell settings put global animator_duration_scale 0.0"') + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb shell settings put global window_animation_scale 0.0"') + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb shell settings put global transition_animation_scale 0.0"') + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb shell settings put global animator_duration_scale 0.0"') emulator_commander.disable_animations end @@ -15,36 +15,36 @@ describe '#increase_logcat_storage' do it 'increases_logcat_storage' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb logcat -G 16m"') + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb logcat -G 16m"') emulator_commander.increase_logcat_storage end end describe '#emulator_is_healthy?' do it 'returns true if emulator is healthy' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") expect(emulator_commander.emulator_is_healthy?).to be true end it 'returns false if emulator is unhealthy' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb devices"').and_return("emulator_5554 \tunauthorized") + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb devices"').and_return("emulator_5554 \tunauthorized") expect(emulator_commander.emulator_is_healthy?).to be false end end describe '#check_connection' do it 'returns false if simulator is unhealthy' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb devices"').and_return("emulator_5554 \tunauthorized") + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb devices"').and_return("emulator_5554 \tunauthorized") expect(emulator_commander.check_connection).to be false end it 'returns true if simulator is healthy' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") expect(emulator_commander.check_connection).to be true end it 'prints a success message if simulator is healthy' do - expect(Fastlane::Actions).to receive(:sh).with('docker exec -i a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") + expect(Fastlane::Actions).to receive(:sh).with('docker exec a_name bash -l -c "adb devices"').and_return("emulator_5554 \tdevice") expect(Fastlane::UI).to receive(:success).with('Checking if emulator is connected to ADB.') expect(Fastlane::UI).to receive(:success).with('Emulator connected successfully') emulator_commander.check_connection