Skip to content

Commit

Permalink
Add spec discovery to README
Browse files Browse the repository at this point in the history
  • Loading branch information
toroidal-code committed Feb 18, 2024
1 parent 4be75b1 commit 67ff040
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ FetchContent_Declare(
CPMAddPackage("gh:toroidal-code/cppspec@VERSION")
```

Specs can then be automatically added as targets with
```cmake
discover_specs(specs_folder)
```
This will create a separate executable for every file ending in `_spec.cpp` in the given directory (recursive) and add them to CTest.

## Introduction

If you've ever used RSpec or Jasmine, chances are you'll be familiar with C++Spec's syntax. For example, this is a C++Spec version of the first snippet on RSpec's [README](https://github.com/rspec/rspec-core/blob/master/README.md#basic-structure).
Expand Down

0 comments on commit 67ff040

Please sign in to comment.