<commit_before>describe Fastlane do
  describe Fastlane::FastFile do
    describe "adb" do
      before(:each) do
        ENV['ANDROID_HOME'] = nil
        ENV['ANDROID_SDK_ROOT'] = nil
        ENV['ANDROID_SDK'] = nil
      end

      it "generates a valid command" do
        result = Fastlane::FastFile.new.parse("lane :test do
          adb(command: 'test', adb_path: './fastlane/README.md')
        end").runner.execute(:test)

        expect(result).to eq(" ./fastlane/README.md test")
      end

      it "picks up path from ANDROID_HOME environment variable" do
        result = Fastlane::FastFile.new.parse("lane :test do
          ENV['ANDROID_HOME'] = '/usr/local/android-sdk'
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end

      it "picks up path from ANDROID_SDK_ROOT environment variable" do
        result = Fastlane::FastFile.new.parse("lane :test do
          ENV['ANDROID_SDK_ROOT'] = '/usr/local/android-sdk'
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end

      it "picks up path from ANDROID_SDK environment variable" do
        result = Fastlane::FastFile.new.parse("lane :test do
          ENV['ANDROID_SDK'] = '/usr/local/android-sdk'
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end
    end
  end
end
<commit_msg>Replaced adb_spec ENV settings with stubbed ENV (#12465)<commit_after>describe Fastlane do
  describe Fastlane::FastFile do
    describe "adb" do
      it "generates a valid command" do
        result = Fastlane::FastFile.new.parse("lane :test do
          adb(command: 'test', adb_path: './fastlane/README.md')
        end").runner.execute(:test)

        expect(result).to eq(" ./fastlane/README.md test")
      end

      it "picks up path from ANDROID_HOME environment variable" do
        stub_const('ENV', { 'ANDROID_HOME' => '/usr/local/android-sdk' })
        result = Fastlane::FastFile.new.parse("lane :test do
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end

      it "picks up path from ANDROID_SDK_ROOT environment variable" do
        stub_const('ENV', { 'ANDROID_SDK_ROOT' => '/usr/local/android-sdk' })
        result = Fastlane::FastFile.new.parse("lane :test do
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end

      it "picks up path from ANDROID_SDK environment variable" do
        stub_const('ENV', { 'ANDROID_SDK' => '/usr/local/android-sdk' })
        result = Fastlane::FastFile.new.parse("lane :test do
          adb(command: 'test')
        end").runner.execute(:test)

        expect(result).to eq(" /usr/local/android-sdk/platform-tools/adb test")
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.13473344103392568, 'fraction_numerical': 0.0016155088852988692, 'mean_word_length': 2.5833333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1545564', 'n_tokens_mistral': 1009, 'n_tokens_neox': 972, 'n_words': 221}