Commits

David Krentzlin  committed dcb9dba

fixed #3

  • Participants
  • Parent commits e1c19c1

Comments (0)

Files changed (3)

File chickumber-server.scm

   chickumber
   test
   defstruct
-  (rename missbehave (pending mb:pending) ($ mb:$))
+  (except missbehave pending $)
   (only posix file-modification-time glob current-directory directory? set-signal-handler! signal/int signal/hup signal/term signal/quit)
   (only extras read-line sprintf read-file printf)
   (only data-structures alist-ref conc)
 ;; custom step-evaluators that are aware of the test-mechanism used.
 (define current-step-evaluator    (make-parameter boolean-step-evaluator))
 (define current-step-evaluator-dependencies (make-parameter '()))
+(define current-step-evaluator-prolog (make-parameter '()))
 
 (define (with-test-framework framework thunk)
   (case framework
        (thunk)))
     ((missbehave)
      (parameterize ((current-step-evaluator missbehave-step-evaluator)
-                    (current-step-evaluator-dependencies '(missbehave)))
+                    (current-step-evaluator-prolog `((require-extension (except missbehave pending $)))))
        (thunk)))
     ((test)
      (parameterize ((current-step-evaluator test-step-evaluator)
     (development
      `(begin
         (use regex ,@(current-step-evaluator-dependencies))
+        ,@(current-step-evaluator-prolog)
         (load "chickumber.scm")
         (import chickumber)
         (parameterize ((current-steps-file ,file))
           ,@content)))
     (else
      `(begin
-        (use regex chickumber ,@(current-step-evaluator-dependencies))
+        (use regex ,@(current-step-evaluator-dependencies))
+        ,@(current-step-evaluator-prolog)
+        (require-extension chickumber)
         (parameterize ((current-steps-file ,file))
           ,@content))))))
 

File features/framework_missbehave.feature

+@wire
 Feature: Support missbehave as a test-framework for stepdefs
   In order to decrease my learning curve
   As a developer
   And a file named "features/step_definitions/some_remote_place.wire" with:
   """
   host: localhost
-  port: 54321
+  port: 54322
   """
 
-@wip @david @framework
+@bug-3
 Scenario: Pending steps
   Given a file named "features/step_definitions/pending.scm" with:
   """
   (Given #/we're all wired/ ()
-    (pending "later"))
+    (pending))
   """
-  And there is a wire server running on port 54321 with testframework "missbehave" and stepfiles "features/step_definitions/pending.scm"
+  And there is a wire server running on port 54322 with testframework "missbehave" and stepfiles "features/step_definitions/pending.scm"
   When I run cucumber -f pretty -q
   Then it should pass with
-  """
-  Feature: High strung
-    
-    Scenario: Wired
-      Given we're all wired
-        (Cucumber::Pending)
-        features/wired.feature:3:in `Given we're all wired`
-  """
+      """
+      Feature: High strung
+
+        Scenario: Wired
+          Given we're all wired
+            TODO (Cucumber::Pending)
+            features/wired.feature:3:in `Given we're all wired'
+
+      1 scenario (1 pending)
+      1 step (1 pending)
+
+      """
+
 
 Scenario: Passing steps
 

File features/server.feature

    -h, --help                    Show this help
    -v, --verbose                 Increase verbosity. Can be given multiple times. (overrides -q)
    -p, --port=PORT               port to bind on [default: 61616]
-   -f, --framework=FRAMEWORK     Testframework to use (test boolean)
+   -f, --framework=FRAMEWORK     Testframework to use (test boolean missbehave)
    -q, --quiet                   Disable all output
   """