@Test
  public void the_default_output_directory_should_follow_the_maven_convention()
      throws InitializationError {

    WebDriverFactory mockBrowserFactory = mock(WebDriverFactory.class);
    ThucydidesRunner runner =
        getTestRunnerUsing(SuccessfulSingleTestScenario.class, mockBrowserFactory);

    File outputDirectory = runner.getOutputDirectory();

    assertThat(
        outputDirectory.getPath(),
        is("target" + FILE_SEPARATOR + "site" + FILE_SEPARATOR + "thucydides"));
  }
  @Test
  public void
      the_output_directory_can_be_defined_by_a_system_property_using_any_standard_separators()
          throws InitializationError {

    WebDriverFactory mockBrowserFactory = mock(WebDriverFactory.class);
    ThucydidesRunner runner =
        getTestRunnerUsing(SuccessfulSingleTestScenario.class, mockBrowserFactory);

    System.setProperty("thucydides.outputDirectory", "target/reports/thucydides");

    File outputDirectory = runner.getOutputDirectory();

    assertThat(
        outputDirectory.getPath(),
        is("target" + FILE_SEPARATOR + "reports" + FILE_SEPARATOR + "thucydides"));
  }
  @Test
  public void opera_is_not_currently_a_supported_driver() throws InitializationError {
    try {
      System.setProperty("webdriver.driver", "opera");

      WebDriverFactory mockBrowserFactory = mock(WebDriverFactory.class);
      ThucydidesRunner runner =
          getTestRunnerUsing(SuccessfulSingleTestScenario.class, mockBrowserFactory);

      runner.run(new RunNotifier());

      fail("Should have thrown UnsupportedDriverException");
    } catch (UnsupportedDriverException e) {
      assertThat(
          e.getMessage(),
          containsString("opera is not a supported browser. Supported driver values are:"));
    }
  }