Brian Marick wrote Midje to support Clojure testing with a lot of mocking.
May be worth a try: https://github.com/marick/Midje
-S
--
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 that
On Fri, Sep 16, 2011 at 4:01 PM, Stuart Sierra
wrote:
> On Friday, September 16, 2011 3:12:49 PM UTC-4, Brian Hurt wrote:
>>
>> How *should* I structure this code for testing? I was assuming the
>> natural way to do this is to make A, B, and C separate name spaces but maybe
>> this is wrong.
>
>
On Fri, Sep 16, 2011 at 4:28 PM, Chris Perkins wrote:
> On Friday, September 16, 2011 3:12:49 PM UTC-4, Brian Hurt wrote:
>>
>>
>>
>> On Thu, Sep 15, 2011 at 6:42 AM, Chris Perkins wrote:
>>
>>> On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote:
Say I have two name spa
On Friday, September 16, 2011 3:12:49 PM UTC-4, Brian Hurt wrote:
>
>
>
> On Thu, Sep 15, 2011 at 6:42 AM, Chris Perkins wrote:
>
>> On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote:
>>>
>>> Say I have two name spaces, A and B, with A depending on B. I want to
>>> test namespa
On Friday, September 16, 2011 3:12:49 PM UTC-4, Brian Hurt wrote:
>
> How *should* I structure this code for testing? I was assuming the natural
> way to do this is to make A, B, and C separate name spaces but maybe this is
> wrong.
The best way to make these namespaces testable, in my opinion
On Thu, Sep 15, 2011 at 6:42 AM, Chris Perkins wrote:
> On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote:
>>
>> Say I have two name spaces, A and B, with A depending on B. I want to
>> test namespace A, replacing module B with a mock B for testing purposes-
>> preferably witho
On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote:
>
> Say I have two name spaces, A and B, with A depending on B. I want to test
> namespace A, replacing module B with a mock B for testing purposes-
> preferably without having to load B at all (B sucks in a bunch of stuff,
>
You can't easily prevent the loading of B unless it's in a separate
directory that isn't part of your classpath during testing.
You could define B-mock to load B and then redefine all the symbols.
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
You could call the mock file B_mock.clj
then
(require '[B-mock :as B])
Jonathan
On Wed, Sep 14, 2011 at 5:19 PM, Brian Hurt wrote:
> Say I have two name spaces, A and B, with A depending on B. I want to test
> namespace A, replacing module B with a mock B for testing purposes-
> preferably wi
Say I have two name spaces, A and B, with A depending on B. I want to test
namespace A, replacing module B with a mock B for testing purposes-
preferably without having to load B at all (B sucks in a bunch of stuff,
like dependencies on databases and external web sites and etc. that I don't
want t
10 matches
Mail list logo