You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,6 @@
6
6
7
7
An attempt at a compatibility layer of RSpec for Opal.
8
8
9
-
#### For the README for the latest release, click [here](https://github.com/opal/opal-rspec/blob/releases/0-6-stable/README.md).
10
-
11
9
## Usage
12
10
13
11
Add `opal-rspec` to your Gemfile:
@@ -16,6 +14,26 @@ Add `opal-rspec` to your Gemfile:
16
14
gem 'opal-rspec'
17
15
```
18
16
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
+
19
37
## Requirements
20
38
21
39
Besides what's already reflected in the GEM dependencies:
0 commit comments