<commit_before>import Quick
import Nimble
@testable import Clappr

class MediaControlTests: QuickSpec {

    override func spec() {
        describe("MediaControl") {
            let options = [kSourceUrl: "http://globo.com/video.mp4"]
            var container: Container!
            var playback: StubedPlayback!

            beforeEach {
                let loader = Loader()
                loader.addExternalPlugins([StubedPlayback.self])
                container = Container(loader: loader, options: options as Options)
                playback = container.playback as! StubedPlayback
            }

            context("Initialization") {

                it("Should have a init method to setup with container") {
                    let mediaControl = MediaControl.create()
                    mediaControl.setup(container)

                    expect(mediaControl).toNot(beNil())
                    expect(mediaControl.container) == container
                }
            }

            context("Behavior") {
                var mediaControl: MediaControl!

                beforeEach {
                    mediaControl = MediaControl.create()
                    mediaControl.setup(container)
                }<commit_msg>refactor: update media control tests to use new loader structure<commit_after>import Quick
import Nimble
@testable import Clappr

class MediaControlTests: QuickSpec {

    override func spec() {
        describe("MediaControl") {
            let options = [kSourceUrl: "http://globo.com/video.mp4"]
            var container: Container!
            var playback: StubedPlayback!

            beforeEach {
                Loader.shared.addExternalPlugins([StubedPlayback.self])
                container = Container(options: options as Options)
                playback = container.playback as! StubedPlayback
            }

            context("Initialization") {

                it("Should have a init method to setup with container") {
                    let mediaControl = MediaControl.create()
                    mediaControl.setup(container)

                    expect(mediaControl).toNot(beNil())
                    expect(mediaControl.container) == container
                }
            }

            context("Behavior") {
                var mediaControl: MediaControl!

                beforeEach {
                    mediaControl = MediaControl.create()
                    mediaControl.setup(container)
                }
{'fraction_non_alphanumeric': 0.077140549273021, 'fraction_numerical': 0.0008077544426494346, 'mean_word_length': 1.6267232237539766, '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': '6601856', 'n_tokens_mistral': 586, 'n_tokens_neox': 538, 'n_words': 134}