<commit_before>require File.expand_path('../../spec_helper', __FILE__)

describe "Pod::Command::Install" do
  it "should include instructions on how to reference the xcode project" do
    Pod::Command::Install.banner.should.match /xcodeproj path\/to\/project.xcodeproj/
  end

  before do
    @config_before = config
    Pod::Config.instance = nil
    config.silent = true
  end

  after do
    Pod::Config.instance = @config_before
  end

  describe "When the Podfile does not specify the xcodeproject" do
    before do
      config.stubs(:rootspec).returns(Pod::Podfile.new { platform :ios; dependency 'AFNetworking'})
    end
    it "raises an informative error if the xcodproj is not specified in the podfile" do
      installer = Pod::Command::Install.new(Pod::Command::ARGV.new)
      should.raise(Pod::Informative) { installer.run }
    end
  end
end
<commit_msg>Raise an informative error when Podfile specifies xcodeproj to an invalid path<commit_after>require File.expand_path('../../spec_helper', __FILE__)

describe "Pod::Command::Install" do
  it "should include instructions on how to reference the xcode project" do
    Pod::Command::Install.banner.should.match /xcodeproj path\/to\/project.xcodeproj/
  end

  before do
    @config_before = config
    Pod::Config.instance = nil
    config.silent = true
  end

  after do
    Pod::Config.instance = @config_before
  end

  describe "When the Podfile does not specify the xcodeproject" do
    before do
      config.stubs(:rootspec).returns(Pod::Podfile.new { platform :ios; dependency 'AFNetworking'})
      @installer = Pod::Command::Install.new(Pod::Command::ARGV.new)
    end
    it "raises an informative error" do
      should.raise(Pod::Informative) { @installer.run }
    end
  end

  describe "When the Podfile specifies xcodeproj to an invalid path" do
    before do
      config.stubs(:rootspec).returns(Pod::Podfile.new { platform :ios; xcodeproj 'nonexistent/project.xcodeproj'; dependency 'AFNetworking'})
      @installer = Pod::Command::Install.new(Pod::Command::ARGV.new)
    end

    it "raises an informative error" do
      should.raise(Pod::Informative) {@installer.run}
    end

  end
end

{'fraction_non_alphanumeric': 0.10661764705882353, 'fraction_numerical': 0.0, 'mean_word_length': 3.7532751091703056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6181063', 'n_tokens_mistral': 680, 'n_tokens_neox': 669, 'n_words': 187}