<commit_before>require 'rack/test'
require 'spec_helper'

require 'web'

describe Tasseo::Application do
  include Rack::Test::Methods

  def app
    Tasseo::Application
  end

  describe '/' do
    context 'JSON' do
      before do
        header 'Accept', 'application/json'
      end
  
      context 'without dashboards' do
        before do
          app.any_instance.stub(:dashboards) { [] }
        end
        
        it 'should return a 204' do
          get '/'
          last_response.status.should eq(204)
        end

        it 'should return an empty array if there are no dashboards' do
          get '/'
          last_response.body.should be_empty
        end
      end

      context 'with dashboards' do
        before do
          app.any_instance.stub(:dashboards) { ['foo'] }
        end

        it 'should return ok' do
          get '/'
          last_response.should be_ok
        end
<commit_msg>better spec description<commit_after>require 'rack/test'
require 'spec_helper'

require 'web'

describe Tasseo::Application do
  include Rack::Test::Methods

  def app
    Tasseo::Application
  end

  describe 'GET /' do
    context 'JSON' do
      before do
        header 'Accept', 'application/json'
      end
  
      context 'without dashboards' do
        before do
          app.any_instance.stub(:dashboards) { [] }
        end
        
        it 'should return a 204' do
          get '/'
          last_response.status.should eq(204)
        end

        it 'should return an empty array if there are no dashboards' do
          get '/'
          last_response.body.should be_empty
        end
      end

      context 'with dashboards' do
        before do
          app.any_instance.stub(:dashboards) { ['foo'] }
        end

        it 'should return ok' do
          get '/'
          last_response.should be_ok
        end

{'fraction_non_alphanumeric': 0.08047210300429185, 'fraction_numerical': 0.006437768240343348, 'mean_word_length': 1.7588757396449703, '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': '3989013', 'n_tokens_mistral': 548, 'n_tokens_neox': 526, 'n_words': 161}