<commit_before>require File.dirname(__FILE__) + '/../spec_helper'

describe OmniAuth::Builder do
  describe '#provider' do
    it 'should translate a symbol to a constant' do
      OmniAuth::Strategies.should_receive(:const_get).with('MyStrategy').and_return(Class.new)
      OmniAuth::Builder.new(nil) do
        provider :my_strategy
      end
    end
    
    it 'should also just accept a class' do
      class ExampleClass; end
      
      lambda{ OmniAuth::Builder.new(nil) do
        provider ExampleClass
      end }.should_not raise_error
    end
  end
end<commit_msg>fixed namespace issue in builder_spec<commit_after>require File.dirname(__FILE__) + '/../spec_helper'

describe OmniAuth::Builder do
  describe '#provider' do
    it 'should translate a symbol to a constant' do
      OmniAuth::Strategies.should_receive(:const_get).with('MyStrategy').and_return(Class.new)
      OmniAuth::Builder.new(nil) do
        provider :my_strategy
      end
    end
    
    it 'should also just accept a class' do
      class ::ExampleClass; end
      
      lambda{ OmniAuth::Builder.new(nil) do
        provider ::ExampleClass
      end }.should_not raise_error
    end
  end
end
{'fraction_non_alphanumeric': 0.09121621621621621, 'fraction_numerical': 0.0, 'mean_word_length': 3.044368600682594, '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': '2217122', 'n_tokens_mistral': 355, 'n_tokens_neox': 350, 'n_words': 97}