bundler-audit 0.8.0 → 0.9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug-report.md +44 -0
- data/.github/workflows/ruby.yml +14 -1
- data/.rubocop.yml +83 -0
- data/COPYING.txt +4 -4
- data/ChangeLog.md +30 -0
- data/Gemfile +7 -3
- data/README.md +16 -10
- data/Rakefile +7 -3
- data/bundler-audit.gemspec +3 -4
- data/lib/bundler/audit/advisory.rb +23 -2
- data/lib/bundler/audit/cli/formats/json.rb +16 -2
- data/lib/bundler/audit/cli/formats/junit.rb +127 -0
- data/lib/bundler/audit/cli/formats/text.rb +11 -7
- data/lib/bundler/audit/cli/formats.rb +7 -3
- data/lib/bundler/audit/cli.rb +32 -15
- data/lib/bundler/audit/configuration.rb +7 -4
- data/lib/bundler/audit/database.rb +20 -4
- data/lib/bundler/audit/results/insecure_source.rb +4 -1
- data/lib/bundler/audit/results/unpatched_gem.rb +6 -2
- data/lib/bundler/audit/results.rb +1 -1
- data/lib/bundler/audit/scanner.rb +8 -2
- data/lib/bundler/audit/task.rb +20 -5
- data/lib/bundler/audit/version.rb +2 -2
- data/lib/bundler/audit.rb +1 -1
- data/spec/advisory_spec.rb +9 -1
- data/spec/bundle/insecure_sources/Gemfile.lock +69 -71
- data/spec/bundle/secure/Gemfile.lock +51 -53
- data/spec/cli/formats/json_spec.rb +1 -0
- data/spec/cli/formats/junit_spec.rb +284 -0
- data/spec/cli/formats/text_spec.rb +87 -17
- data/spec/cli_spec.rb +57 -17
- data/spec/database_spec.rb +25 -1
- data/spec/fixtures/advisory/CVE-2020-1234.yml +1 -0
- data/spec/fixtures/lib/bundler/audit/cli/formats/bad.rb +0 -2
- data/spec/fixtures/lib/bundler/audit/cli/formats/good.rb +0 -2
- data/spec/results/unpatched_gem_spec.rb +2 -2
- data/spec/scanner_spec.rb +25 -1
- data/spec/spec_helper.rb +5 -1
- metadata +10 -6
@@ -97,6 +97,7 @@ describe Bundler::Audit::CLI::Formats::JSON do
|
|
97
97
|
expect(output_json[:results][0][:advisory][:cve]).to be == advisory.cve
|
98
98
|
expect(output_json[:results][0][:advisory][:osvdb]).to be == advisory.osvdb
|
99
99
|
expect(output_json[:results][0][:advisory][:ghsa]).to be == advisory.ghsa
|
100
|
+
expect(output_json[:results][0][:advisory][:criticality]).to be == advisory.criticality.to_s.downcase
|
100
101
|
expect(output_json[:results][0][:advisory][:unaffected_versions]).to be == advisory.unaffected_versions.map(&:to_s)
|
101
102
|
expect(output_json[:results][0][:advisory][:patched_versions]).to be == advisory.patched_versions.map(&:to_s)
|
102
103
|
end
|
@@ -0,0 +1,284 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'bundler/audit/cli/formats'
|
3
|
+
require 'bundler/audit/cli/formats/junit'
|
4
|
+
require 'bundler/audit/report'
|
5
|
+
|
6
|
+
describe Bundler::Audit::CLI::Formats::Junit do
|
7
|
+
it "must register the 'junit' format" do
|
8
|
+
expect(Bundler::Audit::CLI::Formats[:junit]).to be described_class
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:options) { {} }
|
12
|
+
|
13
|
+
subject do
|
14
|
+
Bundler::Audit::CLI.new([],options).tap do |obj|
|
15
|
+
obj.extend described_class
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#print_report" do
|
20
|
+
let(:report) { Bundler::Audit::Report.new }
|
21
|
+
let(:stdout) { StringIO.new }
|
22
|
+
|
23
|
+
before { subject.print_report(report,stdout) }
|
24
|
+
|
25
|
+
let(:output) { stdout.string }
|
26
|
+
|
27
|
+
context "when vulnerabilities were found" do
|
28
|
+
context "when the report contains InsecureSources" do
|
29
|
+
let(:uri) { URI('git://github.com/foo/bar.git') }
|
30
|
+
let(:insecure_source) do
|
31
|
+
Bundler::Audit::Results::InsecureSource.new(uri)
|
32
|
+
end
|
33
|
+
|
34
|
+
let(:report) do
|
35
|
+
super().tap do |report|
|
36
|
+
report << insecure_source
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'must print "Insecure Source URI found: ..."' do
|
41
|
+
expect(output).to include("Insecure Source URI found: #{uri}")
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'must print have a positive number of failures' do
|
45
|
+
expect(output).to match(/failures="[1-9][0-9]*"/)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context "when the report contains UnpatchedGems" do
|
50
|
+
let(:gem) do
|
51
|
+
Gem::Specification.new do |spec|
|
52
|
+
spec.name = 'test'
|
53
|
+
spec.version = '0.1.0'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
let(:advisory) do
|
58
|
+
Bundler::Audit::Advisory.load(Fixtures.join('advisory','CVE-2020-1234.yml'))
|
59
|
+
end
|
60
|
+
let(:unpatched_gem) do
|
61
|
+
Bundler::Audit::Results::UnpatchedGem.new(gem,advisory)
|
62
|
+
end
|
63
|
+
|
64
|
+
let(:report) do
|
65
|
+
super().tap do |report|
|
66
|
+
report << unpatched_gem
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
it "must print 'Name: ...'" do
|
71
|
+
expect(output).to include("Name: #{gem.name}")
|
72
|
+
end
|
73
|
+
|
74
|
+
it "must print 'Version: ...'" do
|
75
|
+
expect(output).to include("Version: #{gem.version}")
|
76
|
+
end
|
77
|
+
|
78
|
+
context "when the advisory has a CVE ID" do
|
79
|
+
it "must print 'CVE: CVE-YYYY-NNNN'" do
|
80
|
+
expect(output).to include("Advisory: CVE-#{advisory.cve} GHSA-aaaa-bbbb-cccc")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context "when the advisory does not have a CVE ID" do
|
85
|
+
let(:advisory) do
|
86
|
+
super().tap do |advisory|
|
87
|
+
advisory.cve = nil
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
it "must not print 'CVE: CVE-YYYY-NNNN'" do
|
92
|
+
expect(output).to_not include("CVE-")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
context "when the advisory has a GHSA ID" do
|
97
|
+
it "must print 'GHSA-xxxx-xxxx-xxxx'" do
|
98
|
+
expect(output).to include("GHSA-#{advisory.ghsa}")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
context "when the advisory does not have a GHSA ID" do
|
103
|
+
let(:advisory) do
|
104
|
+
super().tap do |advisory|
|
105
|
+
advisory.ghsa = nil
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
it "must not print 'GHSA-xxxx-xxxx-xxxx'" do
|
110
|
+
expect(output).to_not include("GHSA-#{advisory.ghsa}")
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
context "when CVSS v3 is present" do
|
115
|
+
context "when Advisory#criticality is :none (cvss_v3 only)" do
|
116
|
+
let(:advisory) do
|
117
|
+
super().tap do |advisory|
|
118
|
+
advisory.cvss_v3 = 0.0
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
it "must print 'Criticality: None'" do
|
123
|
+
expect(output).to include("Criticality: None")
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
context "when Advisory#criticality is :low" do
|
128
|
+
let(:advisory) do
|
129
|
+
super().tap do |advisory|
|
130
|
+
advisory.cvss_v3 = 0.1
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
it "must print 'Criticality: Low'" do
|
135
|
+
expect(output).to include("Criticality: Low")
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
context "when Advisory#criticality is :medium" do
|
140
|
+
let(:advisory) do
|
141
|
+
super().tap do |advisory|
|
142
|
+
advisory.cvss_v3 = 4.0
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
it "must print 'Criticality: Medium'" do
|
147
|
+
expect(output).to include("Criticality: Medium")
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
context "when Advisory#criticality is :high" do
|
152
|
+
let(:advisory) do
|
153
|
+
super().tap do |advisory|
|
154
|
+
advisory.cvss_v3 = 7.0
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
it "must print 'Criticality: High'" do
|
159
|
+
expect(output).to include("Criticality: High")
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
context "when Advisory#criticality is :critical (cvss_v3 only)" do
|
164
|
+
let(:advisory) do
|
165
|
+
super().tap do |advisory|
|
166
|
+
advisory.cvss_v3 = 9.0
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
it "must print 'Criticality: High'" do
|
171
|
+
expect(output).to include("Criticality: Critical")
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context "when CVSS v2 is present" do
|
177
|
+
let(:advisory) do
|
178
|
+
super().tap do |advisory|
|
179
|
+
advisory.cvss_v3 = nil
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
context "when Advisory#criticality is :low" do
|
184
|
+
let(:advisory) do
|
185
|
+
super().tap do |advisory|
|
186
|
+
advisory.cvss_v2 = 0.0
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
it "must print 'Criticality: Low'" do
|
191
|
+
expect(output).to include("Criticality: Low")
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
context "when Advisory#criticality is :medium" do
|
196
|
+
let(:advisory) do
|
197
|
+
super().tap do |advisory|
|
198
|
+
advisory.cvss_v2 = 4.0
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
it "must print 'Criticality: Medium'" do
|
203
|
+
expect(output).to include("Criticality: Medium")
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
context "when Advisory#criticality is :high" do
|
208
|
+
let(:advisory) do
|
209
|
+
super().tap do |advisory|
|
210
|
+
advisory.cvss_v2 = 7.0
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
it "must print 'Criticality: High'" do
|
215
|
+
expect(output).to include("Criticality: High")
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
it "must print 'URL: ...'" do
|
221
|
+
expect(output).to include("URL: #{advisory.url}")
|
222
|
+
end
|
223
|
+
|
224
|
+
context "when :verbose is not enabled" do
|
225
|
+
it 'must print "Title:" and the advisory description' do
|
226
|
+
expect(output).to include("Title: #{advisory.title}")
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
context "when Advisory#title contains XML special chars" do
|
231
|
+
let(:advisory) do
|
232
|
+
super().tap do |advisory|
|
233
|
+
advisory.title = '<entity id="one">One</entity>'
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
it 'must print "Title:" with escaped characters' do
|
238
|
+
expect(output).to include("Title: #{CGI.escapeHTML(advisory.title)}")
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
context "when Advisory#patched_versions is not empty" do
|
243
|
+
it 'must print "Solution: upgrade to ..."' do
|
244
|
+
expect(output).to include("Solution: upgrade to #{CGI.escapeHTML(advisory.patched_versions.join(', '))}")
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
context "when Advisory#patched_versions is empty" do
|
249
|
+
let(:advisory) do
|
250
|
+
super().tap do |advisory|
|
251
|
+
advisory.patched_versions = []
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
it 'must print "Solution: remove or disable this gem until a patch is available!"' do
|
256
|
+
expect(output).to include("Solution: remove or disable this gem until a patch is available!")
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
it 'must print have a positive number of failures' do
|
261
|
+
expect(output).to match(/failures="[1-9][0-9]*"/)
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
context "when no vulnerabilities were found" do
|
267
|
+
it 'must print an empty testsuite' do
|
268
|
+
expect(output).to include('failures="0"')
|
269
|
+
end
|
270
|
+
|
271
|
+
context "when :quiet is enabled" do
|
272
|
+
let(:options) { {quiet: true} }
|
273
|
+
|
274
|
+
it "should print nothing" do
|
275
|
+
expect(output).to be_empty
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
it "must restore $stdout" do
|
281
|
+
expect($stdout).to_not be(stdout)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
@@ -104,39 +104,109 @@ describe Bundler::Audit::CLI::Formats::Text do
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
context "when
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
context "when CVSS v3 is present" do
|
108
|
+
context "when Advisory#criticality is :none (cvss_v3 only)" do
|
109
|
+
let(:advisory) do
|
110
|
+
super().tap do |advisory|
|
111
|
+
advisory.cvss_v3 = 0.0
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
it "must print 'Criticality: None'" do
|
116
|
+
expect(output_lines).to include("Criticality: None")
|
111
117
|
end
|
112
118
|
end
|
113
119
|
|
114
|
-
|
115
|
-
|
120
|
+
context "when Advisory#criticality is :low" do
|
121
|
+
let(:advisory) do
|
122
|
+
super().tap do |advisory|
|
123
|
+
advisory.cvss_v3 = 0.1
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
it "must print 'Criticality: Low'" do
|
128
|
+
expect(output_lines).to include("Criticality: Low")
|
129
|
+
end
|
116
130
|
end
|
117
|
-
end
|
118
131
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
132
|
+
context "when Advisory#criticality is :medium" do
|
133
|
+
let(:advisory) do
|
134
|
+
super().tap do |advisory|
|
135
|
+
advisory.cvss_v3 = 4.0
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
it "must print 'Criticality: Medium'" do
|
140
|
+
expect(output_lines).to include("Criticality: Medium")
|
123
141
|
end
|
124
142
|
end
|
125
143
|
|
126
|
-
|
127
|
-
|
144
|
+
context "when Advisory#criticality is :high" do
|
145
|
+
let(:advisory) do
|
146
|
+
super().tap do |advisory|
|
147
|
+
advisory.cvss_v3 = 7.0
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
it "must print 'Criticality: High'" do
|
152
|
+
expect(output_lines).to include("Criticality: High")
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
context "when Advisory#criticality is :critical (cvss_v3 only)" do
|
157
|
+
let(:advisory) do
|
158
|
+
super().tap do |advisory|
|
159
|
+
advisory.cvss_v3 = 9.0
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
it "must print 'Criticality: High'" do
|
164
|
+
expect(output_lines).to include("Criticality: Critical")
|
165
|
+
end
|
128
166
|
end
|
129
167
|
end
|
130
168
|
|
131
|
-
context "when
|
169
|
+
context "when CVSS v2 is present" do
|
132
170
|
let(:advisory) do
|
133
171
|
super().tap do |advisory|
|
134
|
-
advisory.
|
172
|
+
advisory.cvss_v3 = nil
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context "when Advisory#criticality is :low" do
|
177
|
+
let(:advisory) do
|
178
|
+
super().tap do |advisory|
|
179
|
+
advisory.cvss_v2 = 0.0
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
it "must print 'Criticality: Low'" do
|
184
|
+
expect(output_lines).to include("Criticality: Low")
|
135
185
|
end
|
136
186
|
end
|
137
187
|
|
138
|
-
|
139
|
-
|
188
|
+
context "when Advisory#criticality is :medium" do
|
189
|
+
let(:advisory) do
|
190
|
+
super().tap do |advisory|
|
191
|
+
advisory.cvss_v2 = 4.0
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
it "must print 'Criticality: Medium'" do
|
196
|
+
expect(output_lines).to include("Criticality: Medium")
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
context "when Advisory#criticality is :high" do
|
201
|
+
let(:advisory) do
|
202
|
+
super().tap do |advisory|
|
203
|
+
advisory.cvss_v2 = 7.0
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
it "must print 'Criticality: High'" do
|
208
|
+
expect(output_lines).to include("Criticality: High")
|
209
|
+
end
|
140
210
|
end
|
141
211
|
end
|
142
212
|
|
data/spec/cli_spec.rb
CHANGED
@@ -15,28 +15,68 @@ describe Bundler::Audit::CLI do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
+
describe "#stats" do
|
19
|
+
let(:size) { 1234 }
|
20
|
+
let(:last_updated_at) { Time.now }
|
21
|
+
let(:commit_id) { 'f0f97c4c493b853319e029d226e96f2c2f0dc539' }
|
22
|
+
|
23
|
+
let(:database) { double(Bundler::Audit::Database) }
|
24
|
+
|
25
|
+
before do
|
26
|
+
expect(Bundler::Audit::Database).to receive(:new).and_return(database)
|
27
|
+
|
28
|
+
expect(database).to receive(:size).and_return(size)
|
29
|
+
expect(database).to receive(:last_updated_at).and_return(last_updated_at)
|
30
|
+
expect(database).to receive(:commit_id).and_return(commit_id)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "prints total advisory count" do
|
34
|
+
expect { subject.stats }.to output(
|
35
|
+
include(
|
36
|
+
"advisories:\t#{size} advisories",
|
37
|
+
"last updated:\t#{last_updated_at}",
|
38
|
+
"commit:\t#{commit_id}"
|
39
|
+
)
|
40
|
+
).to_stdout
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
18
44
|
describe "#update" do
|
45
|
+
let(:database) { double(Bundler::Audit::Database) }
|
46
|
+
|
47
|
+
before do
|
48
|
+
allow(Bundler::Audit::Database).to receive(:new).and_return(database)
|
49
|
+
end
|
50
|
+
|
19
51
|
context "not --quiet (the default)" do
|
20
52
|
context "when update succeeds" do
|
53
|
+
let(:size) { 1234 }
|
54
|
+
let(:last_updated_at) { Time.now }
|
55
|
+
let(:commit_id) { 'f0f97c4c493b853319e029d226e96f2c2f0dc539' }
|
56
|
+
|
21
57
|
before do
|
22
|
-
|
58
|
+
expect(database).to receive(:update!).and_return(true)
|
59
|
+
expect(database).to receive(:size).and_return(size)
|
60
|
+
expect(database).to receive(:last_updated_at).and_return(last_updated_at)
|
61
|
+
expect(database).to receive(:commit_id).and_return(commit_id)
|
23
62
|
end
|
24
63
|
|
25
|
-
it "prints updated message" do
|
26
|
-
expect { subject.update }.to output(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
64
|
+
it "prints updated message and then the stats" do
|
65
|
+
expect { subject.update }.to output(
|
66
|
+
include(
|
67
|
+
"Updated ruby-advisory-db",
|
68
|
+
"ruby-advisory-db:",
|
69
|
+
" advisories:\t#{size} advisories",
|
70
|
+
" last updated:\t#{last_updated_at}",
|
71
|
+
" commit:\t#{commit_id}"
|
72
|
+
)
|
73
|
+
).to_stdout
|
34
74
|
end
|
35
75
|
end
|
36
76
|
|
37
77
|
context "when update fails" do
|
38
78
|
before do
|
39
|
-
|
79
|
+
expect(database).to receive(:update!).and_return(false)
|
40
80
|
end
|
41
81
|
|
42
82
|
it "prints failure message" do
|
@@ -58,22 +98,22 @@ describe Bundler::Audit::CLI do
|
|
58
98
|
expect(error.status).to eq(1)
|
59
99
|
end
|
60
100
|
end
|
61
|
-
|
62
101
|
end
|
63
102
|
|
64
103
|
context "when git is not installed" do
|
65
104
|
before do
|
66
|
-
|
105
|
+
expect(database).to receive(:update!).and_return(nil)
|
106
|
+
|
67
107
|
expect(Bundler).to receive(:git_present?).and_return(false)
|
68
108
|
end
|
69
109
|
|
70
110
|
it "prints failure message" do
|
71
|
-
expect
|
111
|
+
expect {
|
72
112
|
begin
|
73
113
|
subject.update
|
74
114
|
rescue SystemExit
|
75
115
|
end
|
76
|
-
|
116
|
+
}.to output(/Git is not installed!/).to_stderr
|
77
117
|
end
|
78
118
|
|
79
119
|
it "exits with error status code" do
|
@@ -96,7 +136,7 @@ describe Bundler::Audit::CLI do
|
|
96
136
|
|
97
137
|
context "when update succeeds" do
|
98
138
|
before do
|
99
|
-
|
139
|
+
expect(database).to(
|
100
140
|
receive(:update!).with(quiet: true).and_return(true)
|
101
141
|
)
|
102
142
|
end
|
@@ -108,7 +148,7 @@ describe Bundler::Audit::CLI do
|
|
108
148
|
|
109
149
|
context "when update fails" do
|
110
150
|
before do
|
111
|
-
|
151
|
+
expect(database).to(
|
112
152
|
receive(:update!).with(quiet: true).and_return(false)
|
113
153
|
)
|
114
154
|
end
|