<commit_before>#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
#import "SpecHelper.h"
#else
#import <Cedar/SpecHelper.h>
#endif

#import "NSString+PivotalCore.h"

using namespace Cedar::Matchers;

SPEC_BEGIN(NSString_PivotalCore)

describe(@"Pivotal Core extensions to NSString", ^{
    describe(@"stringByCamelizing", ^{
        it(@"should camelize a underscored string", ^{
            NSString *camelizedString = [@"foo_bar_baz" stringByCamelizing];
            expect(camelizedString).to(equal(@"fooBarBaz"));
        });
    });<commit_msg>Add back in a generic behavioral test of PCK's base64 encoding method just to be safe.<commit_after>#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
#import "SpecHelper.h"
#else
#import <Cedar/SpecHelper.h>
#endif

#import "NSString+PivotalCore.h"

using namespace Cedar::Matchers;

SPEC_BEGIN(NSString_PivotalCore)

describe(@"Pivotal Core extensions to NSString", ^{
    describe(@"stringByCamelizing", ^{
        it(@"should camelize a underscored string", ^{
            NSString *camelizedString = [@"foo_bar_baz" stringByCamelizing];
            expect(camelizedString).to(equal(@"fooBarBaz"));
        });
    });
    
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    describe(@"-initWithBase64EncodedData:", ^{
        it(@"continues to base64 encode data", ^{
            const char bytes[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't'};
            
            NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
            NSString *string = [[[NSString alloc] initWithBase64EncodedData:data] autorelease];
            
            string should equal(@"YWJjZGVmZ2hpamtsbW5vcHFyc3Q=");
        });
    });
#pragma clang diagnostic pop
    
{'fraction_non_alphanumeric': 0.14989059080962802, 'fraction_numerical': 0.006017505470459519, 'mean_word_length': 3.775456919060052, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5212889', 'n_tokens_mistral': 631, 'n_tokens_neox': 583, 'n_words': 135}