Skip to content

Commit 6eee41a

Browse files
author
James Foster
authored
Update docs to explain purpose of SampleProjects (Arduino-CI#156)
- Update docs to explain purpose of SampleProjects and avoid impression that they are templates to be followed too closely. - Provide alternative `bundle install` command (the original one doesn't work on macOS 10.16). - Correct location for your project.
1 parent 9df75db commit 6eee41a

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ vendor
8282

8383
### Installing the Dependencies
8484

85-
Fulfilling the `arduino_ci` library dependency is as easy as running this command:
86-
85+
Fulfilling the `arduino_ci` library dependency is as easy as running either of these two commands:
8786
```
88-
$ bundle install
87+
$ bundle install # adds packages to global library (may require admin rights)
88+
$ bundle install --path vendor/bundle # adds packages to local library
8989
```
9090

9191

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Purpose
1+
## Purpose
22

3-
These files are designed to test the Ruby gem itself, such that its basic tasks of library installation and compilation can be verified. (i.e., use minimal C++ files -- feature tests for C++ unittest/arduino code belong in `../TestSomething/test/`).
3+
These files are designed to test the testing framework (the Ruby gem) itself, library installation and compilation. (Feature tests for C++ unittest/arduino code belong in `../TestSomething/test/`.)
44

55
## Naming convention
66

7-
Files in this directory are expected to have names that either contains "bad" if it is expected to fail or "good" if it is expected to pass. This provides a signal to `rspec` for how the code is expected to perform.
7+
Files in this directory are given names that either contains "bad" (if it is expected to fail) or "good" (if it is expected to pass). This provides a signal to `rspec` for how the code is expected to perform (see `spec/cpp_library_spec.rb`).
8+
9+
When writing your own tests you should not follow this ("bad" and "good") naming convention. You should write all your tests expecting them to pass (relying on this `DoSomething` test to ensure that failures are actually noticed!).

SampleProjects/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Arduino Sample Projects
22
=======================
33

4-
This directory contains example projects that are meant to be built with this gem.
4+
This directory contains projects that are meant to be built with and tested by this gem. Although this directory is named `SampleProjects`, it is by no means optional. These project test the testing framework itself, but also provide examples of how you might write your own tests (which should be placed in your system's Arduino `libraries` directory).
55

6-
* "DoSomething" is a bare implementation of a library with a test. Test files prefixed with "bad-" are expected to fail; this is checked as part of the testing on arduino_ci itself.
7-
* "TestSomething" contains a minimial library, but tests for all the mock features of arduino_ci.
6+
* "DoSomething" is a simple test of the testing framework (arduino_ci) itself to verfy that passes and failures are properly identified and reported.
7+
* "TestSomething" contains tests for all the mock features of arduino_ci.

0 commit comments

Comments
 (0)