This will be a series of articles revolving around unit testing where I will work through examples and exploring various aspects of the craft. This is the first installment. This post is a crosspost from my personal blog. The code associated with this article can be found on GitHub. Future and past installments can be found in The Librarian Archive. … Lees verder The Librarian: Introduction to Test-Driven Development
Sometimes you may need to mock Grails (application) configuration in an unit or integration test. E.g. you want to test code which normally would access the property jmxEnabled from the following configuration block: In Grails 2 in Config.groovy
jmxEnabled = true
or Grails 3 in application.yml
Here’s are the most simple options for a Grails 2.4.x or Grails 3.0.x Spock unit- or integration … Lees verder How to mock configuration in a Grails unit- or integration test?