Skip to content
This repository
Browse code

Refactor step result specs

  • Loading branch information...
commit 812e856092564635b22ad08c96a1226825dd891c 1 parent 6b58ca2
Julien Biezemans authored
30  spec/cucumber/runtime/failed_step_result_spec.js
@@ -9,34 +9,24 @@ describe("Cucumber.Runtime.FailedStepResult", function() {
9 9
     stepResult       = Cucumber.Runtime.FailedStepResult(failureException);
10 10
   });
11 11
 
12  
-  describe("isFailed()", function() {
13  
-    it("is truthy", function() {
14  
-      expect(stepResult.isFailed()).toBeTruthy();
15  
-    });
  12
+  it("is failed", function() {
  13
+    expect(stepResult.isFailed()).toBeTruthy();
16 14
   });
17 15
 
18  
-  describe("isPending()", function() {
19  
-    it("is falsy", function() {
20  
-      expect(stepResult.isPending()).toBeFalsy();
21  
-    });
  16
+  it("is not pending", function() {
  17
+    expect(stepResult.isPending()).toBeFalsy();
22 18
   });
23 19
 
24  
-  describe("isSkipped()", function() {
25  
-    it("is falsy", function() {
26  
-      expect(stepResult.isSkipped()).toBeFalsy();
27  
-    });
  20
+  it("is not skipped", function() {
  21
+    expect(stepResult.isSkipped()).toBeFalsy();
28 22
   });
29 23
 
30  
-  describe("isSuccessful()", function() {
31  
-    it("is falsy", function() {
32  
-      expect(stepResult.isSuccessful()).toBeFalsy();
33  
-    });
  24
+  it("is not successful", function () {
  25
+    expect(stepResult.isSuccessful()).toBeFalsy();
34 26
   });
35 27
 
36  
-  describe("isUndefined()", function() {
37  
-    it("is falsy", function() {
38  
-      expect(stepResult.isUndefined()).toBeFalsy();
39  
-    });
  28
+  it("is not undefined", function() {
  29
+    expect(stepResult.isUndefined()).toBeFalsy();
40 30
   });
41 31
 
42 32
   describe("getFailureException()", function() {
30  spec/cucumber/runtime/pending_step_result_spec.js
@@ -8,33 +8,23 @@ describe("Cucumber.Runtime.PendingStepResult", function() {
8 8
     stepResult = Cucumber.Runtime.PendingStepResult();
9 9
   });
10 10
 
11  
-  describe("isFailed()", function() {
12  
-    it("is falsy", function() {
13  
-      expect(stepResult.isFailed()).toBeFalsy();
14  
-    });
  11
+  it("is not failed", function() {
  12
+    expect(stepResult.isFailed()).toBeFalsy();
15 13
   });
16 14
 
17  
-  describe("isPending()", function() {
18  
-    it("is truthy", function() {
19  
-      expect(stepResult.isPending()).toBeTruthy();
20  
-    });
  15
+  it("is pending", function() {
  16
+    expect(stepResult.isPending()).toBeTruthy();
21 17
   });
22 18
 
23  
-  describe("isSkipped()", function() {
24  
-    it("is falsy", function() {
25  
-      expect(stepResult.isSkipped()).toBeFalsy();
26  
-    });
  19
+  it("is not skipped", function() {
  20
+    expect(stepResult.isSkipped()).toBeFalsy();
27 21
   });
28 22
 
29  
-  describe("isSuccessful()", function() {
30  
-    it("is falsy", function() {
31  
-      expect(stepResult.isSuccessful()).toBeFalsy();
32  
-    });
  23
+  it("is not successful", function () {
  24
+    expect(stepResult.isSuccessful()).toBeFalsy();
33 25
   });
34 26
 
35  
-  describe("isUndefined()", function() {
36  
-    it("is falsy", function() {
37  
-      expect(stepResult.isUndefined()).toBeFalsy();
38  
-    });
  27
+  it("is not undefined", function() {
  28
+    expect(stepResult.isUndefined()).toBeFalsy();
39 29
   });
40 30
 });
30  spec/cucumber/runtime/skipped_step_result_spec.js
@@ -9,34 +9,24 @@ describe("Cucumber.Runtime.SkippedStepResult", function() {
9 9
     stepResult = Cucumber.Runtime.SkippedStepResult({step: step});
10 10
   });
11 11
 
12  
-  describe("isFailed()", function() {
13  
-    it("is falsy", function() {
14  
-      expect(stepResult.isFailed()).toBeFalsy();
15  
-    });
  12
+  it("is not failed", function() {
  13
+    expect(stepResult.isFailed()).toBeFalsy();
16 14
   });
17 15
 
18  
-  describe("isPending()", function() {
19  
-    it("is falsy", function() {
20  
-      expect(stepResult.isPending()).toBeFalsy();
21  
-    });
  16
+  it("is not pending", function() {
  17
+    expect(stepResult.isPending()).toBeFalsy();
22 18
   });
23 19
 
24  
-  describe("isSkipped()", function() {
25  
-    it("is truthy", function() {
26  
-      expect(stepResult.isSkipped()).toBeTruthy();
27  
-    });
  20
+  it("is skipped", function() {
  21
+    expect(stepResult.isSkipped()).toBeTruthy();
28 22
   });
29 23
 
30  
-  describe("isSuccessful()", function() {
31  
-    it("is falsy", function() {
32  
-      expect(stepResult.isSuccessful()).toBeFalsy();
33  
-    });
  24
+  it("is not successful", function () {
  25
+    expect(stepResult.isSuccessful()).toBeFalsy();
34 26
   });
35 27
 
36  
-  describe("isUndefined()", function() {
37  
-    it("is falsy", function() {
38  
-      expect(stepResult.isUndefined()).toBeFalsy();
39  
-    });
  28
+  it("is not undefined", function() {
  29
+    expect(stepResult.isUndefined()).toBeFalsy();
40 30
   });
41 31
 
42 32
   describe("getStep()", function() {
30  spec/cucumber/runtime/successful_step_result_spec.js
@@ -8,33 +8,23 @@ describe("Cucumber.Runtime.SuccessfulStepResult", function() {
8 8
     stepResult = Cucumber.Runtime.SuccessfulStepResult();
9 9
   });
10 10
 
11  
-  describe("isFailed()", function() {
12  
-    it("is falsy", function() {
13  
-      expect(stepResult.isFailed()).toBeFalsy();
14  
-    });
  11
+  it("is not failed", function() {
  12
+    expect(stepResult.isFailed()).toBeFalsy();
15 13
   });
16 14
 
17  
-  describe("isPending()", function() {
18  
-    it("is falsy", function() {
19  
-      expect(stepResult.isPending()).toBeFalsy();
20  
-    });
  15
+  it("is not pending", function() {
  16
+    expect(stepResult.isPending()).toBeFalsy();
21 17
   });
22 18
 
23  
-  describe("isSkipped()", function() {
24  
-    it("is falsy", function() {
25  
-      expect(stepResult.isSkipped()).toBeFalsy();
26  
-    });
  19
+  it("is not skipped", function() {
  20
+    expect(stepResult.isSkipped()).toBeFalsy();
27 21
   });
28 22
 
29  
-  describe("isSuccessful()", function() {
30  
-    it("is truthy", function() {
31  
-      expect(stepResult.isSuccessful()).toBeTruthy();
32  
-    });
  23
+  it("is successful", function () {
  24
+    expect(stepResult.isSuccessful()).toBeTruthy();
33 25
   });
34 26
 
35  
-  describe("isUndefined()", function() {
36  
-    it("is falsy", function() {
37  
-      expect(stepResult.isUndefined()).toBeFalsy();
38  
-    });
  27
+  it("is not undefined", function() {
  28
+    expect(stepResult.isUndefined()).toBeFalsy();
39 29
   });
40 30
 });
30  spec/cucumber/runtime/undefined_step_result_spec.js
@@ -9,34 +9,24 @@ describe("Cucumber.Runtime.UndefinedStepResult", function() {
9 9
     stepResult = Cucumber.Runtime.UndefinedStepResult({step: step});
10 10
   });
11 11
 
12  
-  describe("isFailed()", function() {
13  
-    it("is falsy", function() {
14  
-      expect(stepResult.isFailed()).toBeFalsy();
15  
-    });
  12
+  it("is not failed", function() {
  13
+    expect(stepResult.isFailed()).toBeFalsy();
16 14
   });
17 15
 
18  
-  describe("isPending()", function() {
19  
-    it("is falsy", function() {
20  
-      expect(stepResult.isPending()).toBeFalsy();
21  
-    });
  16
+  it("is not pending", function() {
  17
+    expect(stepResult.isPending()).toBeFalsy();
22 18
   });
23 19
 
24  
-  describe("isSkipped()", function() {
25  
-    it("is falsy", function() {
26  
-      expect(stepResult.isSkipped()).toBeFalsy();
27  
-    });
  20
+  it("is not skipped", function() {
  21
+    expect(stepResult.isSkipped()).toBeFalsy();
28 22
   });
29 23
 
30  
-  describe("isSuccessful()", function() {
31  
-    it("is falsy", function() {
32  
-      expect(stepResult.isSuccessful()).toBeFalsy();
33  
-    });
  24
+  it("is not successful", function () {
  25
+    expect(stepResult.isSuccessful()).toBeFalsy();
34 26
   });
35 27
 
36  
-  describe("isUndefined()", function() {
37  
-    it("is truthy", function() {
38  
-      expect(stepResult.isUndefined()).toBeTruthy();
39  
-    });
  28
+  it("is undefined", function() {
  29
+    expect(stepResult.isUndefined()).toBeTruthy();
40 30
   });
41 31
 
42 32
   describe("getStep()", function() {

0 notes on commit 812e856

Please sign in to comment.
Something went wrong with that request. Please try again.