Skip to content

Commit

Permalink
Update the README with --init info
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Feb 4, 2019
1 parent af029ca commit 8e9a3ef
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

An attempt at a compatibility layer of RSpec for Opal.

#### For the README for the latest release, click [here](https://github.com/opal/opal-rspec/blob/releases/0-6-stable/README.md).

## Usage

Add `opal-rspec` to your Gemfile:
Expand All @@ -16,6 +14,26 @@ Add `opal-rspec` to your Gemfile:
gem 'opal-rspec'
```

*(since v0.7.1)*

Then type `opal-rspec --init`, this command will create a `spec-opal/` folder for you with a minimal `spec_helper.rb` file. At this point you can write your first opal-spec!

_spec-opal/simple_sum_spec.rb_

```rb
RSpec.describe 'a simple sum' do
it 'equals two!' do
expect(1 + 1).to eq(2)
end
end
```

To run your specs, simply type:

```bash
bundle exec opal-rspec --color spec-opal/
```

## Requirements

Besides what's already reflected in the GEM dependencies:
Expand Down

0 comments on commit 8e9a3ef

Please sign in to comment.