Skip to content

Commit

Permalink
Parameterize counting visible lines
Browse files Browse the repository at this point in the history
  • Loading branch information
joranvar committed Aug 17, 2016
1 parent 846dba6 commit 3d6d47e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions features/step-definitions/yafolding-steps.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
(And "^I call yafolding-hide-element$"
(lambda () (yafolding-hide-element)))

(Then "^I should see only one line$"
(lambda ()
(Then "^I should see \\(?:only \\)?\\([0-9]+\\) lines?$"
(lambda (num-lines)
(save-excursion
(next-line)
(beginning-of-buffer)
(next-line (string-to-number num-lines))
(should (= (line-number-at-pos (point))
(line-number-at-pos (point-max)))))))

Expand Down
2 changes: 1 addition & 1 deletion features/yafolding.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Feature: Fold all lines
When I call yafolding-hide-all
And I go to line 1
And I call yafolding-hide-element
Then I should see only one line
Then I should see only 1 line

0 comments on commit 3d6d47e

Please sign in to comment.