Sha256: 06e0428160760e371fa312d35c195a7e1da7d3a988d0f13e47f503b1145ade5a

Contents?: true

Size: 1.24 KB

Versions: 6

Compression:

Stored size: 1.24 KB

Contents

//
//  DemoTests.m
//  DemoTests
//
//  Created by Ash Furrow on 2014-07-23.
//  Copyright (c) 2014 Ash Furrow. All rights reserved.
//

#define EXP_SHORTHAND
#import <Specta/Specta.h>
#import <Expecta/Expecta.h>
#import <Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h>

#import <XCTest/XCTest.h>
#import "ASHViewController.h"

SpecBegin(ASHViewController)

describe(@"a view controller", ^{
    __block ASHViewController *viewController;
    beforeEach(^{
        viewController = [[ASHViewController alloc] init];
    });
    
    describe(@"with a loaded view", ^{
        beforeEach(^{
            expect(viewController.view).toNot.beNil();
        });
        
        it(@"should have a valid snapshot", ^{
            expect(viewController).to.haveValidSnapshot();
        });
    });
});

describe(@"views", ^{
    it(@"should be green", ^{
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
        view.backgroundColor = [UIColor purpleColor];
        expect(view).to.haveValidSnapshot();
    });
    
    it(@"should be red", ^{
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 60, 320)];
        view.backgroundColor = [UIColor orangeColor];
        expect(view).to.haveValidSnapshot();
    });

});


SpecEnd

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
second_curtain-0.6.0 Demo/DemoTests/DemoTests.m
second_curtain-0.5.0 Demo/DemoTests/DemoTests.m
second_curtain-0.4.0 Demo/DemoTests/DemoTests.m
second_curtain-0.3.0 Demo/DemoTests/DemoTests.m
second_curtain-0.2.4 Demo/DemoTests/DemoTests.m
second_curtain-0.2.3 Demo/DemoTests/DemoTests.m