Sha256: 68b5b9895c6e2abe27f447a2cf5f6a1fb499e98667e1a2d0798b30167e984e5c

Contents?: true

Size: 1.28 KB

Versions: 9

Compression:

Stored size: 1.28 KB

Contents

# How to test Decidim engines

## Requirements

You need to create a dummy application to run your tests. Run the following command in the decidim root's folder:

```bash
bundle exec rake test_app
```

## Running a specific test file or just a single spec

If you are writing new specs, you can run the tests contained in a single file by opening a console window in the corresponding module and calling `rspec`on the file. For example:

```bash
cd decidim-participatory_processes
bundle exec rspec spec/forms/participatory_process_form_spec.rb
```

You can also run a single test by appending its start line number to the command:

```bash
bundle exec rspec spec/forms/participatory_process_form_spec.rb:134
```

## Running tests for a specific component

A Decidim engine can be tested running the rake task named after it. For
example, to test the proposals engine, you can run:

```bash
bundle exec rake test_proposals
```

## Running the whole test suite

You can also run the full thing including test application generation and tests
for all components by running

```bash
bundle exec rake test_all
```

But beware, it takes a long time... :)

## Make CircleCI not run tests for a specific commit

If you want that CircleCI no run tests for a specific commit, add this in your commit message `[ci_skip]`

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-0.23.6 docs/advanced/testing.md
decidim-0.23.5 docs/advanced/testing.md
decidim-0.23.4 docs/advanced/testing.md
decidim-0.23.3 docs/advanced/testing.md
decidim-0.23.2 docs/advanced/testing.md
decidim-0.23.1 docs/advanced/testing.md
decidim-0.23.1.rc1 docs/advanced/testing.md
decidim-0.23.0 docs/advanced/testing.md
decidim-0.22.0 docs/advanced/testing.md