Re: What's the best way to test private functions?

2011-06-17 Thread Brian Marick
falsey) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: hammock driven development...

2011-06-09 Thread Brian Marick
walks. Mileage varies. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Testing clojure.contrib.condition

2011-04-29 Thread Brian Marick
) (throw-exception hi) = (throws Error #h.)) You could use what's already built in, since conditions are built on top of exceptions. Alternately, you could write condition-specific checkers specialized to clojure.contrib.condition. I could help you with that. - Brian Marick, Artisanal Labrador

Midje 1.1 released (testing tool)

2011-04-05 Thread Brian Marick
) =streams= (range))) https://github.com/marick/Midje/wiki/Using-stateful-functions-as-prerequisites - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog

Re: Midje 1.1 released (testing tool)

2011-04-05 Thread Brian Marick
or failed. I have it on my list to make such a connection, just because people expect it. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed

Re: Monad Lessons

2011-03-12 Thread Brian Marick
://www.vimeo.com/20798376 http://www.vimeo.com/20963938 - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received

Re: better error messages smaller stack traces

2011-02-28 Thread Brian Marick
in the tracker if it turns out you were right but Midje was wrong.) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received

Re: clojure.contrib.condition

2011-02-28 Thread Brian Marick
'clojure.contrib.condition) in the repl and in your program? Thanks for the offer of help. I decided that going monadic would be cleaner. I'll revisit this if I turn out to be wrong. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http

Re: Release.Next Version Number

2011-02-24 Thread Brian Marick
like semantic versioning myself, but I think considerations are different for peripheral libraries like mine than they are for the foundational core of the whole shebang. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http

Re: Ordering of defn's?

2011-02-23 Thread Brian Marick
. If that's a style you like, you may be interested in this: http://www.vimeo.com/19404746 - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick

Re: Release.Next Version Number

2011-02-23 Thread Brian Marick
for a 2.0. I agree. My gut tells me 2.0 implies promises about the ecosystem and ease-of-adoption. Clojure 2.0 would be overpromising. Better to underpromise and overdeliver, as they say. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming

clojure.contrib.condition

2011-02-07 Thread Brian Marick
or something else I'm doing wrong. Please enlighten. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message

ANN: Midje ready for production use (#testing #clojure.test)

2011-01-25 Thread Brian Marick
clojure.test to Midje: http://www.youtube.com/watch?v=a7YtkcIiLGI (8 minutes) The entry point to the documentation is here: https://github.com/marick/Midje/blob/master/README.md Thank you. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample

Distinguishing a map from a record

2011-01-21 Thread Brian Marick
In the absence of #'record?, what's the safest way to tell whether a particular object is a true map or a record? - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com

Re: Testing if a sequence is lazy

2011-01-18 Thread Brian Marick
)) = (throws Error #Boom))) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed

Re: Testing if a sequence is lazy

2011-01-18 Thread Brian Marick
On Jan 18, 2011, at 11:29 AM, Brian Marick wrote: f this were my problem, I'd wonder if I could make the computation accept functions. Then you could do something like this: That was a lame solution except in the special case where the first element must be computed. Here's a better

Book on Ring - reviewers needed

2011-01-17 Thread Brian Marick
I'm working on a short book on Ring for the Pragmatic Bookshelf. The first two chapters are here: http://exampler.com/tmp/ring.pdf If you'd like to be a reviewer, send me mail. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample

list* does not make a list?

2011-01-16 Thread Brian Marick
movies.core (list? (apply list (map identity [1 2 3]))) true Makes sense to me! movies.core (list? (list* (map identity [1 2 3]))) false Huh? - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly

Midje 0.9 released #testing

2011-01-07 Thread Brian Marick
] :in-any-order :gaps-ok)) true ;; You can use checkers within checkers: user (fact {:a 1 :b 3 :c 5} = (just {:a odd? :b odd? :c odd?})) true ... and so on. You can find a complete description here: https://github.com/marick/Midje/wiki/Checkers-for-collections-and-strings - Brian Marick

Re: Mocking multimethods

2010-12-22 Thread Brian Marick
!)) (remove-patch ...patch...) = :nothing-of-interest) @visible-evidence-of-a-side-effect = :happened!)) 1855 $ lein midje midje.util.git All claimed facts (2) have been confirmed. 1856 $ - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring

Re: Mocking multimethods

2010-12-22 Thread Brian Marick
! visible-evidence-of-a-side-effect :happened!)) (remove-patch ...patch...) = :nothing-of-interest) @visible-evidence-of-a-side-effect = :happened!)) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T

Re: Mocking multimethods

2010-12-22 Thread Brian Marick
of the features of other clojure.test alternatives. For example, it doesn't have the auto-runner that LazyTest does, and it doesn't have the trimmed stack traces of Expectations. I plan to keep stealing ideas, though. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author

Re: Midje: a different slant on clojure testing

2010-12-16 Thread Brian Marick
when I use chatty checkers (which was inspired by Phlip's assert{2.0} for Ruby http://www.oreillynet.com/ruby/blog/2008/02/assert2.html) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T) www.exampler.com

Re: Midje: a different slant on clojure testing

2010-12-16 Thread Brian Marick
and change old tests to the new format at your leisure. (The downside is that if you want the test summaries to be right, you have to wrap the Midje tests in #'deftest. Otherwise fact successes and failures aren't counted when you do 'lein test'.) - Brian Marick, Artisanal Labrador Contract

Re: unquote

2010-12-15 Thread Brian Marick
this output: a b c (nil nil nil) (See also #'dorun.) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you

Midje: a different slant on clojure testing

2010-12-15 Thread Brian Marick
dec) = -1) (background (around :facts (sql/with-connection db ?form))) I've worked up an emacs interface, and there are features I'd like other test frameworks to steal (like chatty checkers). It will make me happy if you try Midje. - Brian Marick, Artisanal Labrador Contract

Re: Midje: a different slant on clojure testing

2010-12-15 Thread Brian Marick
/Background-prerequisites - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google

Re: Getting strange behavior when stubbing

2010-12-12 Thread Brian Marick
silently spin forever. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups

Re: Getting strange behavior when stubbing

2010-12-10 Thread Brian Marick
.) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Pre-expansion macro form

2010-12-05 Thread Brian Marick
On Dec 5, 2010, at 3:32 PM, Alex Osborne wrote: Is there any way to get the original call form? Something like env? Some hook into the reader? Try form I should have guessed. Thanks. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring

Re: Test-driven development in Clojure

2010-10-25 Thread Brian Marick
.) - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Conj arrivals and Thursday night...

2010-10-19 Thread Brian Marick
the same time, would be happy to join. - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google

Re: Test-driven development in Clojure

2010-10-12 Thread Brian Marick
if I can live on top of lazytest's reporting. If you want normal reporting, you can wrap Midje facts in deftest: (deftest numerical-reverser-tests (fact (numerical-reverser 103) = 301 (provided (string-reverser 103) = 301))) I do that in Midje's tests for itself. - Brian

Re: Test-driven development in Clojure

2010-10-11 Thread Brian Marick
his blog posts illuminating. I'll be doing a talk on this at Strange Loop, and would also be happy to show people at clojure-conj. - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com

Line numbers for forms embedded in macros

2010-09-12 Thread Brian Marick
it annotate it with the correct line numbers. That way, a simple keyboard gesture will take me to the failing line. Better ideas for fallbacks? - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com

Re: testing local functions?

2010-09-10 Thread Brian Marick
it to be good style to make helper functions only as visible as needed, e.g. by using letfn. But when I want to test my code, I just dont see a way to access these local functions for tests. - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author

Re: clojure-conj registration is now open!

2010-09-04 Thread Brian Marick
Well, I'll be there even though they've inexplicably scheduled the birthday party for the day before my birthday. - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog

Tutorial: clojure.zip

2010-09-02 Thread Brian Marick
I've written a short tutorial for clojure.zip: http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/ - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog

Re: Clojure Conj Questions

2010-08-20 Thread Brian Marick
with 1 quarter, 2 dimes, 2 nickels, and 10 pennies baked in. Thanks! - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because

Re: Identifying error-kit Throwables

2010-08-16 Thread Brian Marick
. - Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups Clojure group. To post

<    1   2   3