Latest 0.0.8
Homepage https://github.com/AlexDenisov/Tsuga
License MIT
Platforms ios 5.0, osx 10.7
Dependencies Cedar
Authors

Tsuga – set of Cedar helpers

Features

Spec definition

CDR_EXT
Tsuga<Sample>::run(^{
    it(@"sample spec", ^{
        YES should_not be_truthy;
    });
});

Subject

subject([User new]);

it(@"selector", ^{
    subject() should responds_to(@selector(hello));
});

it(@"name", ^{
    subject() should responds_to(@"hello");
});

‘should’ shorthand


beforeEach(^{
  subject([User new]);
});

it(@"smth", ^{
  ts_should responds_to(@selector(hello)); // subject() should responds_to(@selector(hello))
});

Context helpers

ts_class(^{

    it(@"", ^{
        ts_should equal([User class]);
    });

});

ts_instance(^{

    it(@"", ^{
        ts_should be_instance_of([User class]);
    });

});

Expands to:


context(@"class", ^{
    beforeEach(^{
        subject([SomeClass class]);
    });

    it(@"", ^{
        ts_should equal([User class]);
    });

});

context(@"instance", ^{
    beforeEach(^{
        subject([SomeClass new]);
    });

    it(@"", ^{
        ts_should be_instance_of([User class]);
    });

});

RespondsTo

subject should responds_to(@selector(hello));
subject should responds_to(@"hello");
Shorthand
responds(^{
    to(@selector(fuu));
    to(@selector(bar:));
    to(@selector(bu:zz:));
});

ConformsTo

subject should conforms_to(@protocol(Conformable));
subject should conforms_to(@"Conformable");
Shorthand
conforms(^{
    to(@protocol(UITableViewDelegate));
    to(@protocol(PrintableObject));
});

Latest podspec

{
    "name": "Tsuga",
    "version": "0.0.8",
    "license": "MIT",
    "summary": "Set of helpers for Cedar.",
    "homepage": "https://github.com/AlexDenisov/Tsuga",
    "authors": {
        "Alex Denisov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AlexDenisov/Tsuga.git",
        "tag": "0.0.8"
    },
    "source_files": "Tsuga/Core/**/*.{h,m,mm}",
    "dependencies": {
        "Cedar": [
            "~> 0.9"
        ]
    },
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    },
    "requires_arc": false
}

Pin It on Pinterest

Share This