<commit_before>import Mockingjay
import MockingjayMatchers
import Nimble
import Portal
import Quick
import Result

class GetUserSpec: QuickSpec {
    override func spec() {
        describe("getting a user") {
            context("current user") {
                it("should result in a User") {
                    let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
                    configuration.protocolClasses = [MockingjayProtocol.self] as [AnyClass] + configuration.protocolClasses!
                    
                    let token = "token"
                    let client = APIClient(token: token, configuration: configuration)
                    
                    let avatarURL = "https://s.gravatar.com/avatar/6a12a226806bb77aa45dac4133d76227"
                    let emailAddress = "<EMAIL>"
                    let founderNumber = 0
                    let id = "f03c6cf1-74ce-4c01-b8fe-cef0f2443e46"
                    let name = "<NAME>"
                    let sitesQuota = 7
                    
                    let responseBody = [
                        "avatar": avatarURL,
                        "email": emailAddress,
                        "founder": founderNumber,
                        "id": id,
                        "name": name,
                        "quotaSites": sitesQuota
                    ]
                    
                    let user = User(
                        avatarURL: NSURL(string: avatarURL),
                        emailAddress: emailAddress,
                        founderNumber: founderNumber,
                        id: NSUUID(UUIDString: id)!,
                        name: name,
                        sitesQuota: sitesQuota
                    )
                    
                    let matcher = api(.GET, "https://api.thegrid.io/user", token: token)
                    let builder = json(responseBody)
                    self.stub(matcher, builder: builder)
                    
                    var responseValue: User?
                    var responseError: NSError?
                    
                    client.getUser { result in
                        responseValue = result.value
                        responseError = result.error
                    }
                    
                    expect(responseValue).toEventually(equal(user))
                    expect(responseError).toEventually(beNil())
                }
            }
        }
    }
}<commit_msg>Remove redundant test context.<commit_after>import Mockingjay
import MockingjayMatchers
import Nimble
import Portal
import Quick
import Result

class GetUserSpec: QuickSpec {
    override func spec() {
        describe("getting the current user") {
            it("should result in a User") {
                let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
                configuration.protocolClasses = [MockingjayProtocol.self] as [AnyClass] + configuration.protocolClasses!
                
                let token = "token"
                let client = APIClient(token: token, configuration: configuration)
                
                let avatarURL = "https://s.gravatar.com/avatar/6a12a226806bb77aa45dac4133d76227"
                let emailAddress = "<EMAIL>"
                let founderNumber = 0
                let id = "f03c6cf1-74ce-4c01-b8fe-cef0f2443e46"
                let name = "<NAME>"
                let sitesQuota = 7
                
                let responseBody = [
                    "avatar": avatarURL,
                    "email": emailAddress,
                    "founder": founderNumber,
                    "id": id,
                    "name": name,
                    "quotaSites": sitesQuota
                ]
                
                let user = User(
                    avatarURL: NSURL(string: avatarURL),
                    emailAddress: emailAddress,
                    founderNumber: founderNumber,
                    id: NSUUID(UUIDString: id)!,
                    name: name,
                    sitesQuota: sitesQuota
                )
                
                let matcher = api(.GET, "https://api.thegrid.io/user", token: token)
                let builder = json(responseBody)
                self.stub(matcher, builder: builder)
                
                var responseValue: User?
                var responseError: NSError?
                
                client.getUser { result in
                    responseValue = result.value
                    responseError = result.error
                }
                
                expect(responseValue).toEventually(equal(user))
                expect(responseError).toEventually(beNil())
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.07210031347962383, 'fraction_numerical': 0.017136886102403343, 'mean_word_length': 1.1404293381037567, 'pattern_counts': {'":': 12, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '2010056', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1052, 'n_words': 244}