Skip to content

Commit 7004fc3

Browse files
authored
Improve RSpec slides (#248)
* Add missing 'end' * Update Ruby version in example * Update RSpec version in examples * Fix examples descriptions for documentation format
1 parent a8579cf commit 7004fc3

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

slides/rspec.markdown

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ is exactly what TDD is about.
120120
Install ruby
121121

122122
```bash
123-
$ rvm install ruby-2.4.2
123+
$ rvm install ruby-2.7.2
124124
```
125125

126126
Create isolated gemset
127127

128128
```bash
129-
$ rvm use 2.4.2@hello-rspec --create
130-
ruby-2.4.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.4.2@hello-rspec
131-
ruby-2.4.2 - #generating hello-rspec wrappers - please wait
132-
Using /Users/ty/.rvm/gems/ruby-2.4.2 with gemset hello-rspec
129+
$ rvm use 2.7.2@hello-rspec --create
130+
ruby-2.7.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.7.2@hello-rspec
131+
ruby-2.7.2 - #generating hello-rspec wrappers - please wait
132+
Using /Users/ty/.rvm/gems/ruby-2.7.2 with gemset hello-rspec
133133
```
134134

135135
Prepare project directory
@@ -152,11 +152,11 @@ Initialize Gemfile with rspec
152152
$ bundle init
153153
Writing new Gemfile to /home/User/ty/hello-rspec/Gemfile
154154

155-
$ bundle inject rspec 3.7
155+
$ bundle inject rspec 3.10
156156
Fetching gem metadata from https://rubygems.org/..........
157157
Resolving dependencies...
158158
Added to Gemfile:
159-
gem 'rspec', '~> 3.7.0'
159+
gem 'rspec', '~> 3.10.0'
160160
```
161161

162162
Run bundle Install
@@ -1050,7 +1050,7 @@ $ rspec spec/array_spec.rb --format documentation
10501050
Array with some elements
10511051
should not be empty
10521052
should not be empty
1053-
should have the prescribed elements
1053+
has the prescribed elements
10541054
10551055
Finished in 0.00495 seconds
10561056
3 examples, 0 failures
@@ -2218,6 +2218,7 @@ module Calculation
22182218
expect(Statistic::LEVEL).to eq(15)
22192219
end
22202220
end
2221+
end
22212222
```
22222223
22232224
---
@@ -2563,10 +2564,10 @@ Task details are [here](https://docs.google.com/document/d/1VW3Mk1W-pGkq0FadPih6
25632564
--
25642565
25652566
```bash
2566-
$ rvm use 2.3.0@codebreaker --create
2567-
ruby-2.3.0 - #gemset created /Users/ty/.rvm/gems/ruby-2.3.0@codebreaker
2568-
ruby-2.3.0 - #generating codebreaker wrappers - please wait
2569-
Using /Users/ty/.rvm/gems/ruby-2.3.0 with gemset codebreaker
2567+
$ rvm use 2.7.2@codebreaker --create
2568+
ruby-2.7.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.7.2@codebreaker
2569+
ruby-2.7.2 - #generating codebreaker wrappers - please wait
2570+
Using /Users/ty/.rvm/gems/ruby-2.7.2 with gemset codebreaker
25702571
```
25712572
25722573
```bash

slides/rspec_new.markdown

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ is exactly what TDD is about.
120120
Install ruby
121121

122122
```bash
123-
$ rvm install ruby-2.4.2
123+
$ rvm install ruby-2.7.2
124124
```
125125

126126
Create isolated gemset
127127

128128
```bash
129-
$ rvm use 2.4.2@hello-rspec --create
130-
ruby-2.4.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.4.2@hello-rspec
131-
ruby-2.4.2 - #generating hello-rspec wrappers - please wait
132-
Using /Users/ty/.rvm/gems/ruby-2.4.2 with gemset hello-rspec
129+
$ rvm use 2.7.2@hello-rspec --create
130+
ruby-2.7.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.7.2@hello-rspec
131+
ruby-2.7.2 - #generating hello-rspec wrappers - please wait
132+
Using /Users/ty/.rvm/gems/ruby-2.7.2 with gemset hello-rspec
133133
```
134134

135135
Prepare project directory
@@ -152,11 +152,11 @@ Initialize Gemfile with rspec
152152
$ bundle init
153153
Writing new Gemfile to /home/User/ty/hello-rspec/Gemfile
154154

155-
$ bundle inject rspec 3.8
155+
$ bundle inject rspec 3.10
156156
Fetching gem metadata from https://rubygems.org/..........
157157
Resolving dependencies...
158158
Added to Gemfile:
159-
gem 'rspec', '~> 3.8.0'
159+
gem 'rspec', '~> 3.10.0'
160160
```
161161

162162
Run bundle Install
@@ -950,7 +950,7 @@ $ rspec spec/array_spec.rb --format documentation
950950
Array with some elements
951951
should not be empty
952952
should not be empty
953-
should have the prescribed elements
953+
has the prescribed elements
954954
955955
Finished in 0.00495 seconds
956956
3 examples, 0 failures
@@ -3388,6 +3388,7 @@ module Calculation
33883388
expect(Statistic::LEVEL).to eq(15)
33893389
end
33903390
end
3391+
end
33913392
```
33923393
33933394
---
@@ -4089,10 +4090,10 @@ Task details are [here](https://docs.google.com/document/d/1VW3Mk1W-pGkq0FadPih6
40894090
--
40904091
40914092
```bash
4092-
$ rvm use 2.3.0@codebreaker --create
4093-
ruby-2.3.0 - #gemset created /Users/ty/.rvm/gems/ruby-2.3.0@codebreaker
4094-
ruby-2.3.0 - #generating codebreaker wrappers - please wait
4095-
Using /Users/ty/.rvm/gems/ruby-2.3.0 with gemset codebreaker
4093+
$ rvm use 2.7.2@codebreaker --create
4094+
ruby-2.7.2 - #gemset created /Users/ty/.rvm/gems/ruby-2.7.2@codebreaker
4095+
ruby-2.7.2 - #generating codebreaker wrappers - please wait
4096+
Using /Users/ty/.rvm/gems/ruby-2.7.2 with gemset codebreaker
40964097
```
40974098
40984099
```bash

0 commit comments

Comments
 (0)