Skip to content

Commit 75c06eb

Browse files
committed
add RSpec.before(:suite) hook
1 parent 587fbdd commit 75c06eb

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

.rspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--require spec_helper
1+
--require rails_helper

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# README
22

3-
This README would normally document whatever steps are necessary to get the
4-
application up and running.
3+
```
4+
bundle install
5+
```
56

6-
Things you may want to cover:
7+
# RSpec
78

8-
* Ruby version
9+
Run:
910

10-
* System dependencies
11+
```
12+
rspec
13+
```
1114

12-
* Configuration
15+
The RSpec before(:suite) hook is called.
1316

14-
* Database creation
17+
Expected output:
1518

16-
* Database initialization
19+
```
20+
RSpec before(:suite) hook called.
21+
.........
1722
18-
* How to run the test suite
23+
Finished in 0.00998 seconds (files took 0.51173 seconds to load)
24+
9 examples, 0 failures
25+
```
1926

20-
* Services (job queues, cache servers, search engines, etc.)
21-
22-
* Deployment instructions
23-
24-
* ...

spec/spec_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,9 @@
9292
Kernel.srand config.seed
9393
=end
9494
end
95+
96+
RSpec.configure do |config|
97+
config.before(:suite) do
98+
puts 'RSpec before(:suite) hook called.'
99+
end
100+
end

0 commit comments

Comments
 (0)