<commit_before># encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe 'UserAgentHelper' do
  describe 'browsers name' do

    # BROWSER
    # :sf => 'Safari'
    # :ch => 'Chrome'
    # :ff => 'Firefox'
    # :ie => 'Internet Explorer'
    # :oth => 'Other'

    it 'should return "Safari" to key :sf' do
      UserAgentHelper.browser_name(:sf).should  == 'Safari'
      UserAgentHelper.browser_name('sf').should == 'Safari'
    end

    # it 'should return "Tablet" to key :t' do
    #   UserAgentHelper.device_name(:t).should  == 'Tablet'
    #   UserAgentHelper.device_name('t').should == 'Tablet'
    # end
    # 
    # it 'should return "Mobile" to key :m' do
    #   UserAgentHelper.device_name(:m).should  == 'Mobile'
    #   UserAgentHelper.device_name('m').should == 'Mobile'
    # end
    # 
    # it 'should return "Other" to key :oth' do
    #   UserAgentHelper.device_name(:oth).should  == 'Other'
    #   UserAgentHelper.device_name('oth').should == 'Other'
    # end
    # 
    # it 'should return "Other" to any other key' do
    #   UserAgentHelper.device_name(:wrong).should  == 'Other'
    #   UserAgentHelper.device_name('other thing').should  == 'Other'
    #   UserAgentHelper.device_name(nil).should  == 'Other'
    # end
    # 
    # it 'should raise exeception if there is no param' do
    #   lambda {
    #     UserAgentHelper.device_name
    # 
    #   }.should.raise Exception
    # end  
  end
end<commit_msg>should return "Chrome" to key :ch<commit_after># encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe 'UserAgentHelper' do
  describe 'browsers name' do

    # BROWSER
    # :sf => 'Safari'
    # :ch => 'Chrome'
    # :ff => 'Firefox'
    # :ie => 'Internet Explorer'
    # :oth => 'Other'

    it 'should return "Safari" to key :sf' do
      UserAgentHelper.browser_name(:sf).should  == 'Safari'
      UserAgentHelper.browser_name('sf').should == 'Safari'
    end

    it 'should return "Chrome" to key :ch' do
      UserAgentHelper.browser_name(:ch).should  == 'Chrome'
      UserAgentHelper.browser_name('ch').should == 'Chrome'
    end
    # 
    # it 'should return "Mobile" to key :m' do
    #   UserAgentHelper.browser_name(:m).should  == 'Mobile'
    #   UserAgentHelper.browser_name('m').should == 'Mobile'
    # end
    # 
    # it 'should return "Other" to key :oth' do
    #   UserAgentHelper.browser_name(:oth).should  == 'Other'
    #   UserAgentHelper.browser_name('oth').should == 'Other'
    # end
    # 
    # it 'should return "Other" to any other key' do
    #   UserAgentHelper.browser_name(:wrong).should  == 'Other'
    #   UserAgentHelper.browser_name('other thing').should  == 'Other'
    #   UserAgentHelper.browser_name(nil).should  == 'Other'
    # end
    # 
    # it 'should raise exeception if there is no param' do
    #   lambda {
    #     UserAgentHelper.browser_name
    # 
    #   }.should.raise Exception
    # end  
  end
end
{'fraction_non_alphanumeric': 0.1436223635754938, 'fraction_numerical': 0.0006695681285570807, 'mean_word_length': 2.7918781725888326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1656837', 'n_tokens_mistral': 1028, 'n_tokens_neox': 999, 'n_words': 226}