<commit_before>describe JekyllAdmin::StaticServer do
  include Rack::Test::Methods

  def app
    JekyllAdmin::StaticServer
  end

  it "returns the index" do
    with_index_stubbed do
      get "/"
      expect(last_response).to be_ok
      expected = File.read(index_path)
      expect(last_response.body).to eql(expected)
    end
  end

  it "returns the index for non-existent paths" do
    with_index_stubbed do
      get "/collections"
      expect(last_response).to be_ok
      expected = File.read(index_path)
      expect(last_response.body).to eql(expected)
    end
  end
end<commit_msg>normalize expected index line endings<commit_after>describe JekyllAdmin::StaticServer do
  include Rack::Test::Methods

  def app
    JekyllAdmin::StaticServer
  end

  def expected_index
    expected = File.read(index_path)
    expected.gsub("\r\n", "\n") if Gem.win_platform?
    expected
  end

  it "returns the index" do
    with_index_stubbed do
      get "/"
      expect(last_response).to be_ok
      expect(last_response.body).to eql(expected_index)
    end
  end

  it "returns the index for non-existent paths" do
    with_index_stubbed do
      get "/collections"
      expect(last_response).to be_ok
      expect(last_response.body).to eql(expected_index)
    end
  end
end
{'fraction_non_alphanumeric': 0.0818394388152767, 'fraction_numerical': 0.0, 'mean_word_length': 3.182410423452769, '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': '6874287', 'n_tokens_mistral': 421, 'n_tokens_neox': 412, 'n_words': 101}