Skip to content

Commit

Permalink
Run tests in Rails 6 project
Browse files Browse the repository at this point in the history
Also add CONTRIBUTING.md inside .github dir
  • Loading branch information
nikolalsvk committed Dec 13, 2020
1 parent 7cbab33 commit 554fef5
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 6 deletions.
40 changes: 40 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,40 @@
# :pray: Contributing

Thank you for considering or deciding to contribute, this is much appreciated!
Any kind of bug reports and pull requests are encouraged and welcome on GitHub at
https://github.com/renderedtext/render_async.

## Installing dependencies

You can install all needed dependencies by running `bin/setup`.

## Running RSpec tests

You can run either `rake spec` or `bundle exec rspec` to run all the RSpec tests
in the project.

## Running integration tests

There is a simple command `bin/integration-tests` which sets up 2 submodules,
and runs Cucumber features in them.

There are 2 submodules for render_async. The submodules are Rails 5 and Rails 6
projects which are located in:

- `spec/fixtures/rails-5-base-app`, and
- `spec/fixtures/rails-6-base-app`.

You can find [Rails 5 base app here](https://github.com/nikolalsvk/rails-5-base-app/tree/render-async),
and the [Rails 6 base app here](https://github.com/nikolalsvk/rails-6-base-app/tree/render-async).

Each of them have different use cases of render_async defined in `app/views/render_asyncs/_use_cases.html.erb` in their repos.
All the feature tests are inside `features/render_async.feature` and `features/render_async_jquery.feature` files.

If you are adding one or more feature tests or use cases, make sure to make a
PR on those repos as well and include them in the PR on the render_async repo.

## Need help

Got any issues or difficulties?
Join [render_async's Discord channel](https://discord.gg/SPfbeRm)
and ask questions there. We will try to respond to you as quickly as possible.
2 changes: 1 addition & 1 deletion .gitmodules
Expand Up @@ -5,4 +5,4 @@
[submodule "spec/fixtures/rails-6-base-app"]
path = spec/fixtures/rails-6-base-app
url = git@github.com:nikolalsvk/rails-6-base-app.git
branch = render_async
branch = render-async
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -735,17 +735,15 @@ configure other options:
After checking out the repo, run `bin/setup` to install dependencies. Then, run
`rake spec` to run the tests. You can also run `bin/console` for an interactive
prompt that will allow you to experiment. To run integration tests, use
`bin/integration-tests`.
`bin/integration-tests`. For more information, check out [CONTRIBUTING](.github/CONTRIBUTING.md) file, please.

Got any questions or comments about development (or anything else)?
Join [render_async's Discord channel](https://discord.gg/SPfbeRm)
and let's make `render_async` even better!

## :pray: Contributing

Thank you for considering or deciding to contribute, this is much appreciated!
Any kind of bug reports and pull requests are encouraged and welcome on GitHub at
https://github.com/renderedtext/render_async.
Check out [CONTRIBUTING](.github/CONTRIBUTING.md) file, please.

Got any issues or difficulties?
Join [render_async's Discord channel](https://discord.gg/SPfbeRm)
Expand Down
7 changes: 7 additions & 0 deletions bin/integration-tests
Expand Up @@ -11,3 +11,10 @@ cd spec/fixtures/rails-5-base-app
ls
bundle install
bundle exec cucumber

cd ../../../spec/fixtures/rails-6-base-app
ls
bundle install
yarn install
RAILS_ENV=test bundle exec rails webpacker:compile
bundle exec cucumber

0 comments on commit 554fef5

Please sign in to comment.