From 7eb64f6fee529ac73d70f5f25079dd239ba4912f Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 8 Sep 2020 10:19:01 -0700 Subject: [PATCH 1/2] Update docs to explain purpose of SampleProjects and avoid impression that they are templates to be followed too closely. --- SampleProjects/DoSomething/test/README.md | 8 +++++--- SampleProjects/README.md | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/SampleProjects/DoSomething/test/README.md b/SampleProjects/DoSomething/test/README.md index 6e099ec6..1c958086 100644 --- a/SampleProjects/DoSomething/test/README.md +++ b/SampleProjects/DoSomething/test/README.md @@ -1,7 +1,9 @@ -# Purpose +## Purpose -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/`). +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/`.) ## Naming convention -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. +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`). + +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!). diff --git a/SampleProjects/README.md b/SampleProjects/README.md index 8e4e3405..ad32ca6d 100644 --- a/SampleProjects/README.md +++ b/SampleProjects/README.md @@ -1,7 +1,7 @@ Arduino Sample Projects ======================= -This directory contains example projects that are meant to be built with this gem. +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 the `Projects` directory to avoid being included in the `arduino_ci` project). -* "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. -* "TestSomething" contains a minimial library, but tests for all the mock features of arduino_ci. +* "DoSomething" is a simple test of the testing framework (arduino_ci) itself to verfy that passes and failures are properly identified and reported. +* "TestSomething" contains tests for all the mock features of arduino_ci. From 0f7552f2f22581d03da8d8258ea1d3af874de69a Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 8 Sep 2020 10:39:25 -0700 Subject: [PATCH 2/2] - Provide alternative `bundle install` command (the original one doesn't work on macOS 10.16). - Correct location for your project. --- README.md | 6 +++--- SampleProjects/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ad418e5..6376ec1f 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,10 @@ vendor ### Installing the Dependencies -Fulfilling the `arduino_ci` library dependency is as easy as running this command: - +Fulfilling the `arduino_ci` library dependency is as easy as running either of these two commands: ``` -$ bundle install +$ bundle install # adds packages to global library (may require admin rights) +$ bundle install --path vendor/bundle # adds packages to local library ``` diff --git a/SampleProjects/README.md b/SampleProjects/README.md index ad32ca6d..6b7ed569 100644 --- a/SampleProjects/README.md +++ b/SampleProjects/README.md @@ -1,7 +1,7 @@ Arduino Sample Projects ======================= -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 the `Projects` directory to avoid being included in the `arduino_ci` project). +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). * "DoSomething" is a simple test of the testing framework (arduino_ci) itself to verfy that passes and failures are properly identified and reported. * "TestSomething" contains tests for all the mock features of arduino_ci.