aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/miglayout/pom.xml22
-rw-r--r--modules/mock/pom.xml5
-rw-r--r--modules/mock/src/test/clojure/clojure/contrib/mock/test_adapter.clj52
-rw-r--r--modules/parent/pom.xml24
-rw-r--r--modules/probabilities/pom.xml10
-rw-r--r--modules/sql/pom.xml15
-rw-r--r--modules/strint/pom.xml5
7 files changed, 116 insertions, 17 deletions
diff --git a/modules/miglayout/pom.xml b/modules/miglayout/pom.xml
index c94b6726..22328c7e 100644
--- a/modules/miglayout/pom.xml
+++ b/modules/miglayout/pom.xml
@@ -11,4 +11,26 @@
<relativePath>../parent</relativePath>
</parent>
<artifactId>miglayout</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>core</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>except</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>fcase</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>string</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project> \ No newline at end of file
diff --git a/modules/mock/pom.xml b/modules/mock/pom.xml
index e6eedcf1..d0bf1ee5 100644
--- a/modules/mock/pom.xml
+++ b/modules/mock/pom.xml
@@ -22,5 +22,10 @@
<artifactId>seq</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>ns-utils</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project> \ No newline at end of file
diff --git a/modules/mock/src/test/clojure/clojure/contrib/mock/test_adapter.clj b/modules/mock/src/test/clojure/clojure/contrib/mock/test_adapter.clj
index 5f21ce11..466cb537 100644
--- a/modules/mock/src/test/clojure/clojure/contrib/mock/test_adapter.clj
+++ b/modules/mock/src/test/clojure/clojure/contrib/mock/test_adapter.clj
@@ -1,18 +1,38 @@
-(ns clojure.contrib.test-contrib.mock-test.test-adapter-test
- (:use clojure.contrib.mock.test-adapter
- [clojure.contrib.test-contrib.mock-test :only (assert-called)]
- clojure.test))
-
-(deftest test-report-problem-called
- (def #^{:private true :dynamic true} fn1 (fn [x] "dummy code"))
- (def #^{:private true :dynamic true} fn2 (fn [x y] "dummy code2"))
- (let [under-test (fn [x] (fn1 x))]
- (assert-called clojure.contrib.mock.test-adapter/report-problem
- true (expect [fn1 (times 5)] (under-test "hi")))))
-
-(deftest test-is-report-called
- (assert-called clojure.test/report true
- (clojure.contrib.mock.test-adapter/report-problem
- 'fn-name 5 6 "fake problem")))
+;;; test_adapter.clj: clojure.test adapter for mocking/expectation framework for Clojure
+
+;; by Matt Clark
+
+;; Copyright (c) Matt Clark, 2009. All rights reserved. The use
+;; and distribution terms for this software are covered by the Eclipse
+;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php).
+;; By using this software in any fashion, you are
+;; agreeing to be bound by the terms of this license. You must not
+;; remove this notice, or any other, from this software.
+
+(ns clojure.contrib.mock.test-adapter
+ (:require [clojure.contrib.mock :as mock])
+ (:use clojure.test
+ clojure.contrib.ns-utils))
+
+(immigrate 'clojure.contrib.mock)
+
+(defn report-problem
+ "This function is designed to be used in a binding macro to override
+the report-problem function in clojure.contrib.mock. Instead of printing
+the error to the console, the error is logged via clojure.test."
+ {:dynamic true}
+ [fn-name expected actual msg]
+ (report {:type :fail,
+ :message (str msg " Function name: " fn-name),
+ :expected expected,
+ :actual actual}))
+
+
+(defmacro expect [& body]
+ "Use this macro instead of the standard c.c.mock expect macro to have
+failures reported through clojure.test."
+ `(binding [mock/report-problem report-problem]
+ (mock/expect ~@body)))
+
diff --git a/modules/parent/pom.xml b/modules/parent/pom.xml
index 0e5ba9d0..1ca8f959 100644
--- a/modules/parent/pom.xml
+++ b/modules/parent/pom.xml
@@ -6,7 +6,7 @@
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
- <clojure.version>1.2.0-RC1</clojure.version>
+ <clojure.version>1.2.0-RC3</clojure.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<groupId>org.clojure.contrib</groupId>
@@ -64,4 +64,26 @@
</plugin>
</plugins>
</build>
+ <repositories>
+ <repository>
+ <id>clojure-snapshots</id>
+ <url>http://build.clojure.org/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>clojure-releases</id>
+ <url>http://build.clojure.org/releases</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
</project>
diff --git a/modules/probabilities/pom.xml b/modules/probabilities/pom.xml
index 5f478a18..b55353bc 100644
--- a/modules/probabilities/pom.xml
+++ b/modules/probabilities/pom.xml
@@ -22,5 +22,15 @@
<artifactId>monads</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>macros</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>stream-utils</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project> \ No newline at end of file
diff --git a/modules/sql/pom.xml b/modules/sql/pom.xml
index de94c477..998a5cad 100644
--- a/modules/sql/pom.xml
+++ b/modules/sql/pom.xml
@@ -22,5 +22,20 @@
<artifactId>string</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>except</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>properties</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>seq</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project> \ No newline at end of file
diff --git a/modules/strint/pom.xml b/modules/strint/pom.xml
index 87a0a49f..81d55a41 100644
--- a/modules/strint/pom.xml
+++ b/modules/strint/pom.xml
@@ -12,5 +12,10 @@
</parent>
<artifactId>strint</artifactId>
<dependencies>
+ <dependency>
+ <groupId>org.clojure.contrib</groupId>
+ <artifactId>with-ns</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project> \ No newline at end of file