I asked this in getting-started but should have as...
# test
s
I asked this in getting-started but should have asked here:
Copy code
//what is the best way to test an object that calls external resources.

object Foo {

  private val logger = SomethingThatLogs()

  fun bar(number: Int) {
    if(number == 42){ 
       logger.log("That is the meaning of life")
    }
  }
}
I want to test that the logger is call when 42 is passed in but not 31 but not actually do the logging.