https://github.com/firehed/arc-rails
Tooling to use Arcanist with a Rails-based project
https://github.com/firehed/arc-rails
Last synced: about 1 year ago
JSON representation
Tooling to use Arcanist with a Rails-based project
- Host: GitHub
- URL: https://github.com/firehed/arc-rails
- Owner: Firehed
- License: mit
- Created: 2015-05-14T00:53:11.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-14T00:55:44.000Z (about 11 years ago)
- Last Synced: 2025-02-13T22:27:05.358Z (over 1 year ago)
- Language: PHP
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arc-rails
A bit of tooling to make `arc unit` work in a Rails project.
## Installation
Currently, `git clone` the repo into your Rails project, and include the
following in your `.arcconfig`:
```
"load": ["path/to/this/directory"],
"unit.engine": "RSpecTestEngine"
```
Currently, this cannot be installed as a gem. This is due to a limitation in
Arcanist, where load paths will not expand environment variables. If that is
fixed, then this can be converted to a gem.
## Configuration
At this time, no configuration is suported. The library follows Rails
conventions as closely as possible, so code written The Rails Way(TM) should
work out of the box.
## Requirements
This library makes assumptions about naming conventions that are in line with
Rails naming conventions (as of ~4.2):
* The code to test should be under `ROOT/app` or `ROOT/lib`
* Tests should be in `ROOT/spec`
* Tests files should end in `_spec.rb`
* There should be a 1:1 mapping between names and directories. For example,
source code located at `ROOT/app/models/user.rb` should have its
corresponding test at `ROOT/spec/models/user_spec.rb`
Each test file is run in an isolated process per Aranist conventions, so if
there are dependencies between test files, you will likely encounter problems.
## Usage
`arc unit` should work as expected. The `--everything` flag is supported.
Code coverage reporting is not supported at this time.