title: Gradle "test" task does not fail where it should be
body: <p>Hello I am new to Gradle. We just switch from Maven to Gradle and I have some difficulties in understanding of Gradle test task.
  Here is my class:</p>
  
  <pre><code>public class Money   {
  private final int amount;
  private final String currency;
  
  public Money(int amount, String currency) {
      if (amount &lt; 0) {
          throw new IllegalArgumentException("illegal amount: [" + amount + "]");
      }
      if (currency == null || currency.isEmpty()) {
          throw new IllegalArgumentException("illegal currency: [" + currency + "]");
      }
      //this.amount = 15;
      this.amount = amount;
      this.currency = currency;
  }
  
  public int getAmount() {
      return amount;
  }
  
  public String getCurrency() {
      return currency;
  }
  }
  </code></pre>
  
  <p>And here is my test (using TestNG):</p>
  
  <pre><code>@Test
  public class MoneyManyValuesTest {
    public void testConstructor() {
      Money money = new Money(10, "USD");
      assertEquals(money.getAmount(), 10);
      assertEquals(money.getCurrency(), "USD");
      money = new Money(20, "EUR");
      assertEquals(money.getAmount(), 20);
      assertEquals(money.getCurrency(), "EUR");
   }
  }
  </code></pre>
  
  <p>When I run test  (with gradle "test" task) everything looks like OK.</p>
  
  <p>But then I want my test to fail, so I tweak last row of my test like this:</p>
  
  <pre><code>assertEquals(money.getCurrency(), "EUR want error here");
  </code></pre>
  
  <p>Run gradle "test" again and test still passes with msg:</p>
  
  <pre><code>2:40:26 PM: Executing external task 'test'...
  money:compileJava UP-TO-DATE
  money:processResources UP-TO-DATE
  money:classes UP-TO-DATE
  money:compileTestJava
  money:processTestResources UP-TO-DATE
  money:testClasses
  money:test
  
  BUILD SUCCESSFUL
  </code></pre>
  
  <p>What is going on here?</p>
  
  <p>Here is my build script</p>
  
  <pre><code>apply plugin: 'idea'
  apply plugin: 'eclipse'
  
  apply plugin: 'java';
  apply plugin: 'eclipse'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile 'org.testng:testng:6.3.1'
      testCompile 'org.mockito:mockito-all:1.9.0'
      testCompile 'org.easytesting:fest-assert:1.4'
      testCompile 'org.hamcrest:hamcrest-all:1.1'
  }
  
  test {
      useTestNG()
  }
  }
  </code></pre>