diff --git a/RebelTests/RBLHTMLViewSpec.m b/RebelTests/RBLHTMLViewSpec.m index 03d6e8e..08f8863 100644 --- a/RebelTests/RBLHTMLViewSpec.m +++ b/RebelTests/RBLHTMLViewSpec.m @@ -8,11 +8,21 @@ SpecBegin(RBLHTMLView) -it(@"should contain the set HTML", ^{ - static NSString * const HTML = @"hey buddy"; - RBLHTMLView *view = [[RBLHTMLView alloc] initWithFrame:NSZeroRect]; +static NSString * const HTML = @"hey brother"; + +__block RBLHTMLView *view; + +beforeEach(^{ + view = [[RBLHTMLView alloc] initWithFrame:NSZeroRect]; view.HTML = HTML; +}); + +it(@"should contain the set HTML", ^{ expect([view.mainFrame.DOMDocument.body.innerHTML rangeOfString:HTML].length > 0).to.beTruthy(); }); +it(@"shouldn't be loading after setting the HTML", ^{ + expect(view.isLoading).to.beFalsy(); +}); + SpecEnd