Skip to content

Commit 8e9a3ef

Browse files
committed
Update the README with --init info
1 parent af029ca commit 8e9a3ef

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
An attempt at a compatibility layer of RSpec for Opal.
88

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

1311
Add `opal-rspec` to your Gemfile:
@@ -16,6 +14,26 @@ Add `opal-rspec` to your Gemfile:
1614
gem 'opal-rspec'
1715
```
1816

17+
*(since v0.7.1)*
18+
19+
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!
20+
21+
_spec-opal/simple_sum_spec.rb_
22+
23+
```rb
24+
RSpec.describe 'a simple sum' do
25+
it 'equals two!' do
26+
expect(1 + 1).to eq(2)
27+
end
28+
end
29+
```
30+
31+
To run your specs, simply type:
32+
33+
```bash
34+
bundle exec opal-rspec --color spec-opal/
35+
```
36+
1937
## Requirements
2038

2139
Besides what's already reflected in the GEM dependencies:

0 commit comments

Comments
 (0)