https://github.com/yosefbennywidyo/digro
Digital Room
https://github.com/yosefbennywidyo/digro
bdd ruby-on-rails
Last synced: about 1 month ago
JSON representation
Digital Room
- Host: GitHub
- URL: https://github.com/yosefbennywidyo/digro
- Owner: yosefbennywidyo
- Created: 2017-09-27T09:51:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-20T15:01:38.000Z (8 months ago)
- Last Synced: 2025-03-25T19:11:20.043Z (about 1 month ago)
- Topics: bdd, ruby-on-rails
- Language: Ruby
- Size: 10.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
[](https://semaphoreci.com/fybwid/digro)
[](https://travis-ci.org/fybwid/digro)
[ ](https://app.codeship.com/projects/248092)
[](https://coveralls.io/github/fybwid/digro?branch=master)## Prerequisites
* Ruby: 2.4.0p0
* Rails: 5.1.4
* PostgreSQL: 9.3## Prepared Rails for BDD
### Skip unit test, bundle and used PostgreSQL
```
rails new rails-bdd -T --skip-test-unit, -B --skip-bundle, -d postgresql
```### Install gem locally
```bash
bundle install --path vendor/bundle
```### Add Rspec Rails gem to Gemfile
```bash
group :development, :test do
gem 'rspec-rails'
end
```
#### Install Rspec Rails gem
```bash
bundle
```
#### Bootstrap the application with RSpec
```bash
bundle exec rails generate rspec:install
```
### Add Shoulda Matchers gem to Gemfile
```bash
group :test do
gem 'shoulda-matchers'
end
```
#### Configure Shoulda Matchers gem
Add the following block to the end of `spec/rails_helper.rb`
```bash
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
```
### Added Cucumber gem
```bash
group :test do
gem 'shoulda-matchers'
gem 'cucumber-rails', require: false
gem 'database_cleaner'
end
```
#### Install Cucumber gem
```bash
bundle
```
### Bootstrap the application with Cucumber
```bash
rails generate cucumber:install
```## Testing
### Running all test (RSpec and Cucumber)
`bundle exec rake ci:tests`
### RSpec
#### Single test
`rspec spec/models/post_spec.rb`
#### All test
`rspec`### RSpec
#### Single test
`cucumber features/home_page.feature`
#### All test
`cucumber`
* Ruby version* System dependencies
* Configuration
* Database creation
* Database initialization
* How to run the test suite
* Services (job queues, cache servers, search engines, etc.)
* Deployment instructions
* ...