<commit_before>//
//  ElloWebBrowserViewControllerSpec.swift
//  Ello
//
//  Created by <NAME> on 5/4/2015.
//  Copyright (c) 2015 Ello. All rights reserved.
//

import Ello
import Quick
import Nimble


class ElloWebBrowserViewControllerSpec: QuickSpec {
    override func spec() {
        describe("instantiating an ElloWebBrowserViewControllerSpec") {
            it("is easy to create a navigation controller w/ browser") {
                let nav = ElloWebBrowserViewController.navigationControllerWithWebBrowser()
                expect(nav.rootWebBrowser()).to(beAKindOf(ElloWebBrowserViewController))
            }
            it("is easy to create a navigation controller w/ custom browser") {
                let browser = ElloWebBrowserViewController()
                let nav = ElloWebBrowserViewController.navigationControllerWithBrowser(browser)
                expect(nav.rootWebBrowser()).to(equal(browser))
            }
            it("has a fancy done button") {
                let nav = ElloWebBrowserViewController.navigationControllerWithWebBrowser()
                let browser: ElloWebBrowserViewController = nav.rootWebBrowser() as! ElloWebBrowserViewController
                let xButton = browser.navigationItem.rightBarButtonItem!
                expect(xButton.title).to(equal("\u{2573}"))
            }
        }
    }
}
<commit_msg>fixes the web browser specs<commit_after>//
//  ElloWebBrowserViewControllerSpec.swift
//  Ello
//
//  Created by <NAME> on 5/4/2015.
//  Copyright (c) 2015 Ello. All rights reserved.
//

import Ello
import Quick
import Nimble


class ElloWebBrowserViewControllerSpec: QuickSpec {
    override func spec() {
        describe("instantiating an ElloWebBrowserViewControllerSpec") {
            it("is easy to create a navigation controller w/ browser") {
                let nav = ElloWebBrowserViewController.navigationControllerWithWebBrowser()
                expect(nav.rootWebBrowser()).to(beAKindOf(ElloWebBrowserViewController))
            }
            it("is easy to create a navigation controller w/ custom browser") {
                let browser = ElloWebBrowserViewController()
                let nav = ElloWebBrowserViewController.navigationControllerWithBrowser(browser)
                expect(nav.rootWebBrowser()).to(equal(browser))
            }
            it("has a fancy done button") {
                let nav = ElloWebBrowserViewController.navigationControllerWithWebBrowser()
                let browser: ElloWebBrowserViewController = nav.rootWebBrowser() as! ElloWebBrowserViewController
                let xButton = browser.navigationItem.leftBarButtonItem!
                expect(xButton.title).to(equal("\u{2573}"))
            }
            it("has a fancy share button") {
                let nav = ElloWebBrowserViewController.navigationControllerWithWebBrowser()
                let browser: ElloWebBrowserViewController = nav.rootWebBrowser() as! ElloWebBrowserViewController
                let shareButton = browser.navigationItem.rightBarButtonItem!
                let systemButton = UIBarButtonItem(barButtonSystemItem: .Action, target: nil, action: nil)
                expect(shareButton.action).to(equal("actionButtonPressed:"))
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.0844811753902663, 'fraction_numerical': 0.008570554025099479, 'mean_word_length': 2.567685589519651, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '258318', 'n_tokens_mistral': 858, 'n_tokens_neox': 781, 'n_words': 186}