2

Simple question. I'm trying to test in midje if my method triggers an exception. I could only find something like the following in the midje documentation.

(fact "Should throw a RuntimeException"
               (my-method! anything) =throws=> (RuntimeException.)

Thanks.

Neikon
  • 169
  • 1
  • 10

1 Answers1

2

Never mind. I found it.

(fact "Should throw a RuntimeException"
           (my-method! anything) => (throws RuntimeException)

That works for me.

Neikon
  • 169
  • 1
  • 10