<commit_before>require 'spec_helper'

describe 'Parameter Types' do
  describe 'String' do
    it 'coerces strings' do
      get('/coerce/string', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq('1234')
      end
    end
  end

  describe 'Integer' do
    it 'coerces integers' do
      get('/coerce/integer', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq(1234)
      end
    end
  end

  describe 'Float' do
    it 'coerces floats' do
      get('/coerce/float', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq(1234.0)
      end
    end
  end

  describe 'Time' do
    it 'coerces time' do
      get('/coerce/time', arg: '20130117') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq('2013-01-17 00:00:00 -0500')
      end
    end
  end

  describe 'Date' do
    it 'coerces date' do
      get('/coerce/date', arg: '20130117') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq('2013-01-17')<commit_msg>ignore timezone in time coercian tests<commit_after>require 'spec_helper'

describe 'Parameter Types' do
  describe 'String' do
    it 'coerces strings' do
      get('/coerce/string', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq('1234')
      end
    end
  end

  describe 'Integer' do
    it 'coerces integers' do
      get('/coerce/integer', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq(1234)
      end
    end
  end

  describe 'Float' do
    it 'coerces floats' do
      get('/coerce/float', arg: '1234') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq(1234.0)
      end
    end
  end

  describe 'Time' do
    it 'coerces time' do
      get('/coerce/time', arg: '20130117') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should match(/2013-01-17 00:00:00/)
      end
    end
  end

  describe 'Date' do
    it 'coerces date' do
      get('/coerce/date', arg: '20130117') do |response|
        response.status.should == 200
        JSON.parse(response.body)['arg'].should eq('2013-01-17')
{'fraction_non_alphanumeric': 0.14338235294117646, 'fraction_numerical': 0.06535947712418301, 'mean_word_length': 2.590909090909091, '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': '1349653', 'n_tokens_mistral': 926, 'n_tokens_neox': 784, 'n_words': 203}