We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
passenger / test / CxxTestMain.cpp
100644 25 lines (22 sloc) 0.494 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "tut.h"
#include "tut_reporter.h"
#include <apr_general.h>
#include <signal.h>
#include <cstdlib>
 
namespace tut {
  test_runner_singleton runner;
}
 
int main() {
  apr_initialize();
  tut::reporter reporter;
  tut::runner.get().set_callback(&reporter);
  signal(SIGPIPE, SIG_IGN);
  setenv("RAILS_ENV", "production", 1);
  try {
    tut::runner.get().run_tests();
  } catch (const std::exception &ex) {
    std::cerr << "Exception raised: " << ex.what() << std::endl;
    return 1;
  }
  return 0;
}