GildedRose-Refactoring-Kata/cpp
Anders Arnholm c503bf8a2b Add Approval Tests for cpp
* Add testcase using https://github.com/approvals/ApprovalTests.cpp and google test.
* Change google test to be downloaded if not installed with cmake
* Add a run-once-cmake.sh script to build and test with cmake
* Add a run-approval-once.sh script to build and run approval test
2018-10-13 15:55:30 +02:00
..
CMakeLists.txt Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
GildedRose.cc Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00
GildedRose.h Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00
GildedRoseApprovalMain.cc Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
GildedRoseApprovalTests.cc Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
GildedRoseApprovalTests.VerifyCombinations.approved.txt Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
GildedRoseTextTests.cc Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00
GildedRoseUnitTests.cc Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00
Makefile With Google Test 1.8.0, I seem to need both libs. 2018-08-14 00:22:38 +01:00
README improved installation instructions 2016-01-22 16:55:48 +01:00
run-approval-once.sh Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
run-once-cmake.sh Add Approval Tests for cpp 2018-10-13 15:55:30 +02:00
run-once.sh Removed all the code except for the GildedRose kata from this repo 2013-06-10 14:42:41 +02:00

TL;DR;
-------
run-once.sh runs your tests once

Before this will work you will need:
  - make and a C++ compiler (like gcc) is installed on your system and is in the PATH
  - The GTest framework in the directory gtest.
  - If your IDE does the compilation and linking, you should remove the first 3 lines
    in the run-once.sh file.

More Verbose Instructions
-------------------------

Create a clone of both GildedRose-Refactoring-Kata and googletest in a directory we'll call ${ROOT_INSTALL_DIR}:

    cd ${ROOT_INSTALL_DIR}
    git clone https://github.com/emilybache/GildedRose-Refactoring-Kata
    git clone https://github.com/google/googletest

Make googletest by running make in subfolder googletest/googletest/make:

    cd googletest/googletest/make
    make

Create a softlink in the GildedRose-Refactoring-Kata clone pointing at the googletest code:

    cd ${ROOT_INSTALL_DIR}/GildedRose-Refactoring-Kata/cpp
    ln -s ${ROOT_INSTALL_DIR}/googletest/googletest gtest

Make the GildedRose-Refactoring-Kata:

    make

Then you should be able to run the tests:

    ./run_once.sh

If you have been successful, then you should see a failing test, "GildedRoseTest.Foo".