The tests you wish your tests smelled like.

}). }). } describe("when logged in and viewing another user's profile". function(doc.enableDeciders('swift_following'.toBe(200). function() { expect($('. itHasCommonProfilePageBehavior(). }). }).verified')). var itHasCommonProfilePageBehavior = function() { it("loads successfully".toHaveText(/Follow/). . }). it("includes the verified badge". response) { expect(response.loginAs('talkative'). 'profile_redesign_q3_2012').toHaveAttr('title'. }). function() { expect($('. it("has a follow button". function () { beforeEach(function () { this. "Lil' Kim's profile". 'swift_followers'.status). "Verified").follow-button')).profile-header h1 i.describePage('/lilkim'. }). function() { beforeEach(function () { this.

status). "Lil' Kim's profile".profile-header h1 i. "profile_redesign_q3_2012" itHasCommonProfilePageBehavior = -> it "loads successfully". -> beforeEach -> @enableDeciders "swift_following". -> beforeEach -> @loginAs "talkative" itHasCommonProfilePageBehavior() it "has a follow button". (doc.toHaveText /Follow/ . response) -> expect(response.verified")).describePage "/lilkim". "swift_followers". -> expect($(".follow-button")).toHaveAttr "title". -> expect($(". "Verified" describe "when logged in and viewing another user's profile".toBe 200 it "includes the verified badge".

Sign up to vote on this title
UsefulNot useful