e
>> code base changes and quite a number are outdated.
>> I was wondering if I can use clojure to write unit tests and run them
>> using Junit Runner so that the unit tests pass inside eclipse as part of
>> compilation of Junit test suite execution.
>>
2017 at 9:46 AM wrote:
> Hello All,.
>
> We have a large java code base. Junits are not keeping in pace with the
> code base changes and quite a number are outdated.
> I was wondering if I can use clojure to write unit tests and run them
> using Junit Runner so that the un
Hello All,.
We have a large java code base. Junits are not keeping in pace with the
code base changes and quite a number are outdated.
I was wondering if I can use clojure to write unit tests and run them
using Junit Runner so that the unit tests pass inside eclipse as part of
compilation
Hi,
I have a project which uses some java project. I made classes using
gen-class. Than in unit test just wanted to test it (clojure.test enviro).
If I run tests in emacs+cider they works. If I run test in the command line
I have class not found exception:
boot testing aot run-test
task testing
essage.
>>
>> If you’re using expectations <https://github.com/jaycfields/expectations>
>> then there is also lein-autoexpect
>> <https://github.com/jakemcc/lein-autoexpect> for running your tests on
>> code change. Midje and speclj have their own autotest runne
une 23, 2016 at 4:13:34 PM UTC-5, Fenton Travers wrote:
>
> is there a way to use drip to speed up the running of unit tests?
>>
>> I'm not sure if there is way to use drip to speed up the launching and
>> running of tests, but that would be great if there was.
>>
>
ur tests on code
change. Midje and speclj have their own autotest runners.
On Thursday, June 23, 2016 at 4:13:34 PM UTC-5, Fenton Travers wrote:
is there a way to use drip to speed up the running of unit tests?
>
> I'm not sure if there is way to use drip to speed up the launching an
is there a way to use drip to speed up the running of unit tests?
I'm not sure if there is way to use drip to speed up the launching and
running of tests, but that would be great if there was.
--
You received this message because you are subscribed to the Google
Groups "Clojure"
Thanks Alex, that's very helpful.
-- Ryan
On Wednesday, March 23, 2016 at 5:02:43 AM UTC-7, Alex Miller wrote:
>
> I guess the other important detail there is that when you invoke a var
> holding a function, it invokes the function.
>
> On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Mill
I guess the other important detail there is that when you invoke a var
holding a function, it invokes the function.
On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Miller wrote:
>
> Private functions (really vars marked private holding a function) can
> always be accessed via the var #' s
Private functions (really vars marked private holding a function) can
always be accessed via the var #' syntax:
(ns banana-test
...)
(deftest ring-ring []
(is (sting? (#'banana/phone)))
This is the way private functions are typically tested.
On Wednesday, March 23, 2016 at 6:53:12 AM UT
Hi everyone,
What are your opinions on adding a special metadata to functions to provide
it in scope for tests? This would be a nice language feature to have:
For example,
(ns banana)
(defn- ^:+test phone [] "ring ring ring")
(ns banana-test
...)
(deftest ring-ring []
; We can call the
Got it. Thanks!
On Mon, Jun 8, 2015 at 6:14 PM, David Sargeant wrote:
> I'm not totally sure why you would need to use `provided` with pure
> functions, but that is definitely not in scope for this project. example
> isn't meant to replace all cases where you would write tests. It's designed
> t
I'm not totally sure why you would need to use `provided` with pure
functions, but that is definitely not in scope for this project. example
isn't meant to replace all cases where you would write tests. It's designed
to streamline the creation of a certain class of tests that come with a lot
of
I meant (provided), (against-background), etc.
On Mon, Jun 8, 2015 at 6:02 PM, David Sargeant wrote:
> If I need something more complicated in terms of testing my functions I
> usually create a file dev/examples.clj and add dev to the source-paths in
> my project's dev profile. I would require t
If I need something more complicated in terms of testing my functions I
usually create a file dev/examples.clj and add dev to the source-paths in
my project's dev profile. I would require the namespace with my functions
and put the examples in dev/examples.clj. The rest of the process is the
s
ons.
> 2. Test the output of your functions in the REPL as you code.
> 3. Generate unit tests when you're satisfied with the behavior of your
> functions.
>
> See https://github.com/dubiousdavid/example for more information.
>
> --
> You received this message becaus
Speed up your development cycle using example. Here's the process:
1. Write your test code inline with your functions.
2. Test the output of your functions in the REPL as you code.
3. Generate unit tests when you're satisfied with the behavior of your
functions.
See https://
ith my db. To mock
> data for unit tests I want to re-bind korma.core/select to return known
> data and not hit a db.
>
> Currently I have a db ns:
>
> (nsservices.db
> (:require [korma.core :refer :all]
>[korma.db :refer :all]))
>
>
> With a function
I have a web service that uses Korma for interacting with my db. To mock
data for unit tests I want to re-bind korma.core/select to return known
data and not hit a db.
Currently I have a db ns:
(nsservices.db
(:require [korma.core :refer :all]
[korma.db :refer :all]))
With a
Thanks Matt!
Yes it does! Please give it a go. I would love to see some examples of more
generated readmes
On 27/09/2013, at 1:39, Matt Mitchell wrote:
> Very nice! Does lein-midje-doc use the Midje fact(s) labels?
>
> - Matt
>
> On Wednesday, September 25, 2013 10:33:31 PM UTC-4, zcaudate
Hi Ben!
Thanks for the feedback! I have thought about how this feature may be
implemented. I've got some ideas but a little short on time... With what you
are saying, The autodoc feature has to be built into the library as well. To
generate an index of functions, one can use a tag of some kind.
On 9/25/13 8:33 PM, zcaudate wrote:
I've put up a video of a new documentation plugin for leiningen
Project Page:
https://github.com/zcaudate/lein-midje-doc
Youtube Video:
http://www.youtube.com/watch?v=8FjvhDPIUWE&feature=youtu.be
Sample Generated Documentation:
http://z.caudate.me/lein-midj
Very nice! Does lein-midje-doc use the Midje fact(s) labels?
- Matt
On Wednesday, September 25, 2013 10:33:31 PM UTC-4, zcaudate wrote:
>
> I've put up a video of a new documentation plugin for leiningen
>
> Project Page:
> https://github.com/zcaudate/lein-midje-doc
>
> Youtube Video:
> http://ww
I've put up a video of a new documentation plugin for leiningen
Project Page:
https://github.com/zcaudate/lein-midje-doc
Youtube Video:
http://www.youtube.com/watch?v=8FjvhDPIUWE&feature=youtu.be
Sample Generated Documentation:
http://z.caudate.me/lein-midje-doc/
http://z.caudate.me/ribol/
http
On Dec 22, 8:54 am, Constantine Vetoshev wrote:
> clojure-test-mode is pretty nice, but is there any way to make its
> test namespace naming convention configurable?
>
> It currently expects src/com/company/project/file.clj to correspond to
> test/com/company/project/test/file.clj. I prefer test/t
On Dec 21, 7:16 pm, Phil Hagelberg wrote:
> If you're already using swank then you can try clojure-test-mode; it
> clears out all deftests in between test runs.
>
> https://github.com/technomancy/clojure-mode/blob/master/clojure-test-...
>
> It also highlights failures in the test buffer for bette
you can also move to the failed test and press C-c ' and it will show
them in the mini-buffer
On Tue, Dec 21, 2010 at 11:47 PM, Michael Ossareh wrote:
>
>
> On Tue, Dec 21, 2010 at 21:36, Michael Ossareh wrote:
>>
>> On Tue, Dec 21, 2010 at 16:16, Phil Hagelberg wrote:
>>>
>>> It also highlight
On Tue, Dec 21, 2010 at 21:36, Michael Ossareh wrote:
> On Tue, Dec 21, 2010 at 16:16, Phil Hagelberg wrote:
>>
>>
>> It also highlights failures in the test buffer for better feedback.
>
>
> when there is a failure where are the details of the failure printed out
> to? I love that the highlight
On Tue, Dec 21, 2010 at 16:16, Phil Hagelberg wrote:
>
>
> It also highlights failures in the test buffer for better feedback.
when there is a failure where are the details of the failure printed out to?
I love that the highlight shows me which test have errors, but since I've
moved over to the
Awesome!!! This absolutely does the trick!
On Dec 21, 7:16 pm, Phil Hagelberg wrote:
> On Dec 21, 10:35 am, Alyssa Kwan wrote:
>
> > What about when I need to delete a unit test? Reloading the test
> > buffer doesn't remove it, and I need to either restart swank or
> > reconnect slime, or manu
On Dec 21, 10:35 am, Alyssa Kwan wrote:
> What about when I need to delete a unit test? Reloading the test
> buffer doesn't remove it, and I need to either restart swank or
> reconnect slime, or manually remove those tests using (unmap-ns).
> Surely there's a better way...
If you're already usin
You can delete the entire test namespace with `remove-ns` and then do
`(require ... :reload)`.
Or try Lazytest. :)
-Stuart Sierra
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note tha
Hi everyone,
My typical development workflow is to use leiningen to create a
project stub, modify project.clj to add swank-clojure as a dev-
dependency, and run lein-swank and connect from Emacs slime. As I
create and modify files in the test and src namespaces/directory
structures, I use C-c C-k
--Doh!
Thanks, David, that worked
On Aug 30, 8:29 am, David Nolen wrote:
> On Mon, Aug 30, 2010 at 6:37 AM, garf wrote:
> > I am getting the following error when I switched from defstruct to
> > defrecord
> > **Unable to resolve classname: Rule-record (RecordInitTest.clj:8)**
> > I only have thi
On Mon, Aug 30, 2010 at 6:37 AM, garf wrote:
> I am getting the following error when I switched from defstruct to
> defrecord
> **Unable to resolve classname: Rule-record (RecordInitTest.clj:8)**
> I only have this problem when definition & usage is split between two
> files, i.e.
defrecord cre
Rule-record
[ rname rule-seq ])
and second file that gives the error above when using unit tests
(ns RecordInitTest)
(use 'clojure.test)
(use 'RecordInitQuest)
(deftest ruleform-def-test
(def rule1 (Rule-record.
"rule-name"
"more text")))
--if I
On Mon, Dec 14, 2009 at 8:18 AM, Stuart Halloway
wrote:
>> I see now that the simpler expression:
>>
>> #'clojure.core/spread
>>
>> equivalent to
>>
>> (var clojure.core/spread)
>>
>> also works:
>>
>> user=> (#'clojure.core/spread [:a [:b :c]])
>> (:a :b :c)
>
> This works
Hi,
Am 14.12.2009 um 07:16 schrieb Chouser:
> I'd like a ruling on this as well. It solves a real problem of
> macros getting access to helper functions, so if we shouldn't be
> relying on it, a reliable solution would be desirable.
>
> This technique is actually used in the "new" branch in
> c
On Mon, Dec 14, 2009 at 1:16 AM, Chouser wrote:
> On Sun, Dec 13, 2009 at 7:55 PM, Stephen C. Gilardi wrote:
>>
>> On Dec 13, 2009, at 6:54 PM, Stuart Halloway wrote:
>>
>>> That's great. I wouldn't have expected it to work. Do you think this is by
>>> design or coincidental/subject to change?
>
> I see now that the simpler expression:
>
> #'clojure.core/spread
>
> equivalent to
>
> (var clojure.core/spread)
>
> also works:
>
> user=> (#'clojure.core/spread [:a [:b :c]])
> (:a :b :c)
This works for refs but not for atoms. :-/
Stu
--
You received this message bec
On Sun, Dec 13, 2009 at 7:55 PM, Stephen C. Gilardi wrote:
>
> On Dec 13, 2009, at 6:54 PM, Stuart Halloway wrote:
>
>> That's great. I wouldn't have expected it to work. Do you think this is by
>> design or coincidental/subject to change?
>
> The expression I gave was:
>
> �...@#'clojure.c
On Dec 13, 2009, at 6:54 PM, Stuart Halloway wrote:
> That's great. I wouldn't have expected it to work. Do you think this is by
> design or coincidental/subject to change?
The expression I gave was:
@#'clojure.core/spread
equivalent to:
(deref (var clojure.core/spread))
I s
Steve,
That's great. I wouldn't have expected it to work. Do you think this
is by design or coincidental/subject to change?
Stu
>
> On Dec 13, 2009, at 3:19 PM, Stuart Halloway wrote:
>
>> (1) Is there already a form that does this?
>
> Hi Stuart,
>
> I think the trick is resolving manually:
>
On Dec 13, 2009, at 3:19 PM, Stuart Halloway wrote:
> (1) Is there already a form that does this?
Hi Stuart,
I think the trick is resolving manually:
user=> @#'clojure.core/spread
#
user=> (@#'clojure.core/spread [:a :b [:c :d]])
(:a :b :c :d)
user=>
I
(1) Is there already a form that does this?
or
(2) If not, how can the following be better/simpler:
(use 'clojure.contrib.with-ns)
(defmacro wall-hack-var
"Return the value of a var in a namespace, even
if it is private. Intended for test automation."
[ns v]
`(with-ns '~ns
(if
Thanks for updating my clojure-dev membership
On Dec 10, 1:33 pm, devender wrote:
> Hi, I am interested in expanding the unit test coverage for clojure, I
> have signed and mailed in the Agreement and my name now appears on the
> clojure contributer page. Could someone PLEASE take my patches and
Hi, I am interested in expanding the unit test coverage for clojure, I
have signed and mailed in the Agreement and my name now appears on the
clojure contributer page. Could someone PLEASE take my patches and
apply it to the code ?
Yes I did read "Before you invest time working on a change, discus
I just updated, and the unit tests for mod are breaking. It looks like the
new mod only works for ints.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email
Hi all,
I have placed the sample code for _Programming Clojure_ on github, at
http://github.com/stuarthalloway/programming-clojure
. Most of the code samples now have unit tests, using Stuart Sierra's
test-is.
If you see an erratum in the book that you suspect was caused by
chang
On Nov 24, 6:19 pm, Justin Giancola <[EMAIL PROTECTED]> wrote:
> So, you need to evaluate all of the args independently when building
> the list literals, possibly with:
> (defmacro stub [stubs & body]
> (let [stub-maps
> (reduce (fn [acc [[f & args] res]]
> (assoc-in
On Nov 23, 9:56 pm, James Reeves <[EMAIL PROTECTED]> wrote:
> On Nov 23, 11:58 pm, Justin Giancola <[EMAIL PROTECTED]>
> wrote:
>
> > Neat. I noticed that you're forcing the arg lists into vectors in both
> > make-maps and in stubfn. Since they're not being manipulated at all,
> > you could just a
On Nov 23, 11:58 pm, Justin Giancola <[EMAIL PROTECTED]>
wrote:
> Neat. I noticed that you're forcing the arg lists into vectors in both
> make-maps and in stubfn. Since they're not being manipulated at all,
> you could just as easily leave them as seqs and everything will still
> work.
The reduc
this useful:
>
> (defn stubfn
> "Given a map of argument vectors and return values, construct
> a function to return the value associated with the key of
> arguments."
> [result-map]
> (fn [& args] (result-map (vec args
>
> (defma
(vec args
(defmacro stub
"Create function stubs for isolated unit tests.
e.g. (stub [(f 1 2) 3
(f 3 2) 5]
(= (+ (f 1 2) (f 3 2))
8))"
[stubs & body]
(let [stub-pairs (partition 2 stubs)
make-maps (fn [[[f & args] ret]] {
Ah of course! Thanks :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
Fo
Hi Tim,
You have run afoul of the automagical conversion between Lispy "-" and
Javaish "_":
' sad
(use 'clojure.contrib.test_is)
java.lang.Exception: namespace 'clojure.contrib.test_is' not found
after loading '/clojure/contrib/test_is/test_is.clj' (NO_SOURCE_FILE:0
; happy
user=> (use 'clo
On Tue, Oct 21, 2008 at 12:34 PM, Timothy Pratley
<[EMAIL PROTECTED]> wrote:
>
> I'm a bit stuck on how to load test_is...
> I've added a tiny section to the wiki because I couldn't find any
> instructions on using contrib, and well I made a lot of mistakes along
> the way that other people might
> There's a simple unit testing library in clojure.contrib.test-is.
> Look at the source code comments there for examples of how you can
> define tests.
Thanks Stuart S, I did a subversion grab of the source and well that
looks extreemly useful.
I'm a bit stuck on how to load test_is...
I've add
Thanks Stuart,
That's exactly what I was after.
On Oct 21, 11:05 pm, Stuart Halloway <[EMAIL PROTECTED]>
wrote:
> Hi Tim,
>
> Example below. This is from a demo porting Java code to Clojure, the
> original Java code is in the Apache Commons [1]. Note that test does
> not resolve symbols:
>
>
Hi Tim,
There's a simple unit testing library in clojure.contrib.test-is.
Look at the source code comments there for examples of how you can
define tests.
-Stuart Sierra
On Oct 21, 7:57 am, Timothy Pratley <[EMAIL PROTECTED]> wrote:
> I've noticed around the place a few hints at testing capabil
Hi Tim,
Example below. This is from a demo porting Java code to Clojure, the
original Java code is in the Apache Commons [1]. Note that test does
not resolve symbols:
; don't do this
(test 'index-of-any)
-> :no-test
; do this
(test #'index-of-any)
-> :ok
Cheers,
Stuart
[1]
http://svn.apa
I've noticed around the place a few hints at testing capabilities such
as
(test v)
and contrib having a run tests, but I'm at a bit of a loss as to how
it fits together. If there is a good example I can take a look at
please point me toward it.
Generally what I've been doing is writting a test ca
63 matches
Mail list logo