Sha256: 923507724dda6463fcc6eaac1090d44d39ab9095c805b2874827e81d379752db

Contents?: true

Size: 1006 Bytes

Versions: 15

Compression:

Stored size: 1006 Bytes

Contents

This Tutorial is known to work with hydra version 6.1.0, 6.2.0.  
_Please update this wiki to reflect any other versions that have been tested._

# Goals

* Set up a Rails application to use RSpec

# Explanation
We strongly recommend building a habit of using Test Driven Development.  Most people using Hydra use RSpec for Test Driven Development.  Also, RSpec tests are required with any contributions to any of the core Hydra gems.  Here's how to set up your Rails application to use RSpec for testing.

# Steps

### Step 1: Install the rspec and rspec-rails gems

Ensure your Gemfile includes `rspec-rails`, e.g.:
```ruby
group :development, :test do
  gem "rspec-rails"
end
```
If you had to add `rspec-rails`, run bundle install
```bash
$ bundle install
```

### Step 2: Run the rspec rails generator

On the Command line
```text
rails generate rspec:install
```

### Step 3: Commit your changes

```text
git add .
git commit -m "added rspec"
```

# Next Steps
Return to the [[Dive into Hydra]] page.

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hydra-10.0.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0.rc5 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0.rc4 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0.rc3 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0.rc2 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.1.0.rc1 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-8.0.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.0.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-7.2.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-7.1.1 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-9.0.0.rc1 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-7.1.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-7.0.0 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md
hydra-7.0.0.rc1 doc/Lesson:-set-up-your-Rails-Application-to-use-rspec.md