Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0ce2cad

Browse files
author
Steven G. Harms
committedOct 28, 2019
Update specs to use match matcher
1 parent e7d41e7 commit 0ce2cad

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed
 

‎spec/rack_mechanics_spec.rb

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
require_relative './spec_helper'
22

3-
describe "App" do
4-
3+
describe 'App' do
54
it 'wishes user a good morning in the morning' do
6-
allow(Time).to receive(:now){
7-
Time.new(2015,11,27,9,30)
5+
allow(Time).to receive(:now) {
6+
Time.new(2015, 11, 27, 9, 30)
87
}
98
get '/'
10-
expect(last_response.body).to include("Morning")
9+
expect(last_response.body).to match(/Morning/i)
1110
end
1211

1312
it 'wishes user a good afternoon in the afternoon' do
14-
allow(Time).to receive(:now){
15-
Time.new(2015,11,27,14,30)
13+
allow(Time).to receive(:now) {
14+
Time.new(2015, 11, 27, 14, 30)
1615
}
1716
get '/'
18-
expect(last_response.body).to include("Afternoon")
17+
expect(last_response.body).to match(/Afternoon/i)
1918
end
2019
end

0 commit comments

Comments
 (0)
Please sign in to comment.