0

すべての事実の後に実行されるMidje関数は見つかりませんでした。

コードは次のとおりです。

(background
  (before :contents (println "Before All Facts"))
  (after :contents (println "After All Facts"))
  (before :facts (println "Before Each Fact"))
  (after :facts (println "After Each Fact")))

実際の出力は次のとおりです。

Before All Facts
After All Facts
Before Each Fact
After Each Fact

期待される出力は次のとおりです。

Before All Facts
Before Each Fact
After Each Fact
After All Facts
4

1 に答える 1

1

これを実現するためにすべてのファクトをラップすることができますがwith-state-changes、Clojure にはトップレベル フォームの最大サイズに制限があることに注意してください。この問題を回避するためnamespace-state-changesに、ファイル全体の最初と最後でセットアップとティアダウンを実行するために使用できます。

于 2016-11-15T15:04:00.960 に答える