rdf-spec 1.1.13 → 1.99.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
30
30
  ##
31
31
  # @see RDF::Queryable#query
32
32
  describe "#query" do
33
- it {should respond_to(:query)}
33
+ it {is_expected.to respond_to(:query)}
34
34
 
35
35
  context "when called" do
36
36
  it "requires an argument" do
@@ -63,7 +63,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
63
63
  end
64
64
 
65
65
  it "does not alter a given hash argument" do
66
- query = {:subject => resource, :predicate => RDF::DOAP.name, :object => RDF::FOAF.Person}
66
+ query = {subject: resource, predicate: RDF::URI("http://usefulinc.com/ns/doap#name"), object: RDF::URI("http://xmlns.com/foaf/0.1/Person")}
67
67
  original_query = query.dup
68
68
  subject.query(query)
69
69
  expect(query).to eq original_query
@@ -83,8 +83,8 @@ RSpec.shared_examples 'an RDF::Queryable' do
83
83
  end
84
84
 
85
85
  it "calls #query_pattern" do
86
- expect(subject).to receive(:query_pattern)
87
- expect(subject).not_to receive(:query_execute)
86
+ is_expected.to receive(:query_pattern)
87
+ is_expected.not_to receive(:query_execute)
88
88
  subject.query([:s, :p, :o]) {}
89
89
  end
90
90
  end
@@ -98,8 +98,8 @@ RSpec.shared_examples 'an RDF::Queryable' do
98
98
  end
99
99
 
100
100
  it "calls #query_execute" do
101
- expect(subject).to receive(:query_execute)
102
- expect(subject).not_to receive(:query_pattern)
101
+ is_expected.to receive(:query_execute)
102
+ is_expected.not_to receive(:query_pattern)
103
103
  subject.query(query) {}
104
104
  end
105
105
  end
@@ -107,15 +107,11 @@ RSpec.shared_examples 'an RDF::Queryable' do
107
107
 
108
108
  context "without a block" do
109
109
  context "with a triple argument" do
110
- it "returns an enumerator" do
111
- expect(subject.query([nil, nil, nil])).to be_an_enumerator
112
- end
113
-
114
- it "returns an enumerable enumerator" do
110
+ it "returns an enumerable" do
115
111
  expect(subject.query([nil, nil, nil])).to be_enumerable
116
112
  end
117
113
 
118
- it "returns a queryable enumerator" do
114
+ it "returns a queryable" do
119
115
  expect(subject.query([nil, nil, nil])).to be_queryable
120
116
  end
121
117
 
@@ -151,15 +147,15 @@ RSpec.shared_examples 'an RDF::Queryable' do
151
147
  expect(subject.query([nil, nil, nil]).size).to eq @statements.size
152
148
  expect(subject.query([resource, nil, nil]).size).to eq File.readlines(@doap).grep(/^<http:\/\/rubygems\.org\/gems\/rdf>/).size
153
149
  expect(subject.query([RDF::URI("http://ar.to/#self"), nil, nil]).size).to eq File.readlines(@doap).grep(/^<http:\/\/ar.to\/\#self>/).size
154
- expect(subject.query([resource, RDF::DOAP.name, nil]).size).to eq 1
155
- expect(subject.query([nil, nil, RDF::DOAP.Project]).size).to eq 1
150
+ expect(subject.query([resource, RDF::URI("http://usefulinc.com/ns/doap#name"), nil]).size).to eq 1
151
+ expect(subject.query([nil, nil, RDF::URI("http://usefulinc.com/ns/doap#Project")]).size).to eq 1
156
152
  end
157
153
 
158
154
  it "returns the correct number of results for hash queries" do
159
155
  expect(subject.query({}).size).to eq @statements.size
160
- expect(subject.query(:subject => resource).size).to eq File.readlines(@doap).grep(/^<http:\/\/rubygems\.org\/gems\/rdf>/).size
161
- expect(subject.query(:subject => resource, :predicate => RDF::DOAP.name).size).to eq 1
162
- expect(subject.query(:object => RDF::DOAP.Project).size).to eq 1
156
+ expect(subject.query(subject: resource).size).to eq File.readlines(@doap).grep(/^<http:\/\/rubygems\.org\/gems\/rdf>/).size
157
+ expect(subject.query(subject: resource, predicate: RDF::URI("http://usefulinc.com/ns/doap#name")).size).to eq 1
158
+ expect(subject.query(object: RDF::URI("http://usefulinc.com/ns/doap#Project")).size).to eq 1
163
159
  end
164
160
 
165
161
  it "returns the correct number of results for query queries" do
@@ -171,13 +167,13 @@ RSpec.shared_examples 'an RDF::Queryable' do
171
167
  context "with specific patterns from SPARQL" do
172
168
  context "triple pattern combinations" do
173
169
  it "?s p o" do
174
- expect(subject.query(:predicate => RDF::URI("http://example.org/p"), :object => RDF::Literal.new(1)).to_a).to(
170
+ expect(subject.query(predicate: RDF::URI("http://example.org/p"), object: RDF::Literal.new(1)).to_a).to(
175
171
  include *[RDF::Statement.new(RDF::URI("http://example.org/xi1"), RDF::URI("http://example.org/p"), 1), RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)]
176
172
  )
177
173
  end
178
174
 
179
175
  it "s ?p o" do
180
- expect(subject.query(:subject => RDF::URI("http://example.org/xi2"), :object => RDF::Literal.new(1)).to_a).to(
176
+ expect(subject.query(subject: RDF::URI("http://example.org/xi2"), object: RDF::Literal.new(1)).to_a).to(
181
177
  include *[RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)]
182
178
  )
183
179
  end
@@ -187,8 +183,8 @@ RSpec.shared_examples 'an RDF::Queryable' do
187
183
  context "data/r2/expr-equals" do
188
184
  context "graph-1" do
189
185
  let(:result) do
190
- queryable.query(:predicate => RDF::URI("http://example.org/p"),
191
- :object => RDF::Literal::Integer.new(1)).to_a
186
+ queryable.query(predicate: RDF::URI("http://example.org/p"),
187
+ object: RDF::Literal::Integer.new(1)).to_a
192
188
  end
193
189
 
194
190
  it 'has two solutions' do
@@ -206,8 +202,8 @@ RSpec.shared_examples 'an RDF::Queryable' do
206
202
 
207
203
  context "graph-2" do
208
204
  let(:result) do
209
- queryable.query(:predicate => RDF::URI("http://example.org/p"),
210
- :object => RDF::Literal::Double.new("1.0e0"))
205
+ queryable.query(predicate: RDF::URI("http://example.org/p"),
206
+ object: RDF::Literal::Double.new("1.0e0"))
211
207
  .to_a
212
208
  end
213
209
 
@@ -289,16 +285,16 @@ RSpec.shared_examples 'an RDF::Queryable' do
289
285
  end
290
286
  end
291
287
 
292
- context "with context" do
288
+ context "with context", unless: RDF::VERSION.to_s >= "1.99" do
293
289
  it "returns statements from all contexts with no context" do
294
- pattern = RDF::Query::Pattern.new(nil, nil, nil, :context => nil)
290
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, context: nil)
295
291
  solutions = []
296
292
  subject.send(:query_pattern, pattern) {|s| solutions << s}
297
293
  expect(solutions.size).to eq @statements.size
298
294
  end
299
295
 
300
296
  it "returns statements from unnamed contexts with false context" do
301
- pattern = RDF::Query::Pattern.new(nil, nil, nil, :context => false)
297
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, context: false)
302
298
  solutions = []
303
299
  subject.send(:query_pattern, pattern) {|s| solutions << s}
304
300
  context_statements = subject.statements.reject {|st| st.has_context?}.length
@@ -307,7 +303,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
307
303
 
308
304
  it "returns statements from named contexts with variable context" do
309
305
  unless subject.contexts.to_a.empty?
310
- pattern = RDF::Query::Pattern.new(nil, nil, nil, :context => :c)
306
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, context: :c)
311
307
  solutions = []
312
308
  subject.send(:query_pattern, pattern) {|s| solutions << s}
313
309
  context_statements = subject.statements.select {|st| st.has_context?}.length
@@ -317,7 +313,43 @@ RSpec.shared_examples 'an RDF::Queryable' do
317
313
 
318
314
  it "returns statements from specific context with URI context" do
319
315
  unless subject.contexts.to_a.empty?
320
- pattern = RDF::Query::Pattern.new(nil, nil, nil, :context => RDF::URI("http://ar.to/#self"))
316
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, context: RDF::URI("http://ar.to/#self"))
317
+ solutions = []
318
+ subject.send(:query_pattern, pattern) {|s| solutions << s}
319
+ expect(solutions.size).to eq File.readlines(@doap).grep(/^<http:\/\/ar.to\/\#self>/).size
320
+ end
321
+ end
322
+ end
323
+
324
+ context "with graph_name", if: RDF::VERSION.to_s >= "1.99" do
325
+ it "returns statements from all graphs with no graph_name" do
326
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: nil)
327
+ solutions = []
328
+ subject.send(:query_pattern, pattern) {|s| solutions << s}
329
+ expect(solutions.size).to eq @statements.size
330
+ end
331
+
332
+ it "returns statements from unnamed graphss with false graph_name" do
333
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: false)
334
+ solutions = []
335
+ subject.send(:query_pattern, pattern) {|s| solutions << s}
336
+ named_statements = subject.statements.reject {|st| st.has_name?}.length
337
+ expect(solutions.size).to eq named_statements
338
+ end
339
+
340
+ it "returns statements from named graphss with variable graph_name" do
341
+ unless subject.graph_names.to_a.empty?
342
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: :c)
343
+ solutions = []
344
+ subject.send(:query_pattern, pattern) {|s| solutions << s}
345
+ named_statements = subject.statements.select {|st| st.has_name?}.length
346
+ expect(solutions.size).to eq named_statements
347
+ end
348
+ end
349
+
350
+ it "returns statements from specific graph with URI graph_name" do
351
+ unless subject.graph_names.to_a.empty?
352
+ pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: RDF::URI("http://ar.to/#self"))
321
353
  solutions = []
322
354
  subject.send(:query_pattern, pattern) {|s| solutions << s}
323
355
  expect(solutions.size).to eq File.readlines(@doap).grep(/^<http:\/\/ar.to\/\#self>/).size
@@ -333,16 +365,16 @@ RSpec.shared_examples 'an RDF::Queryable' do
333
365
  let(:failing_pattern) {[RDF::URI("http://no-such-resource"), RDF.type, RDF::Node.new]}
334
366
 
335
367
  it "should respond to #first" do
336
- expect(subject).to respond_to(:first)
368
+ is_expected.to respond_to(:first)
337
369
  end
338
370
 
339
- it "returns enumerator without a pattern" do
371
+ it "returns a statement or solution" do
340
372
  expect { subject.first }.not_to raise_error
341
- expect(subject.first).to eq subject.each.first # uses an Enumerator
373
+ expect(subject.first).to be_a_statement
342
374
  end
343
375
 
344
376
  it "returns the correct value when the pattern matches" do
345
- matching_patterns = [[nil, nil, nil], subject.each.first]
377
+ matching_patterns = [[nil, nil, nil], subject.detect {|s| s.to_a.none? {|r| r.node?}}]
346
378
  matching_patterns.each do |matching_pattern|
347
379
  expect(subject.first(matching_pattern)).to eq subject.query(matching_pattern).each.first
348
380
  end
@@ -365,7 +397,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
365
397
  let(:failing_pattern) {[RDF::URI("http://no-such-resource"), nil, nil]}
366
398
 
367
399
  it "should respond to #first_subject" do
368
- expect(subject).to respond_to(:first_subject)
400
+ is_expected.to respond_to(:first_subject)
369
401
  end
370
402
 
371
403
  it "returns enumerator without a pattern" do
@@ -397,7 +429,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
397
429
  describe "#first_predicate" do
398
430
  let(:failing_pattern) {[nil, RDF::URI("http://no-such-resource"), nil]}
399
431
 
400
- it {should respond_to(:first_predicate)}
432
+ it {is_expected.to respond_to(:first_predicate)}
401
433
 
402
434
  it "returns enumerator without a pattern" do
403
435
  expect { subject.first_predicate }.not_to raise_error
@@ -427,7 +459,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
427
459
 
428
460
  describe "#first_object" do
429
461
  let(:failing_pattern) {[nil, nil, RDF::URI("http://no-such-resource")]}
430
- it {should respond_to(:first_object)}
462
+ it {is_expected.to respond_to(:first_object)}
431
463
 
432
464
  it "returns enurator without a pattern" do
433
465
  expect { subject.first_object }.not_to raise_error
@@ -460,12 +492,12 @@ RSpec.shared_examples 'an RDF::Queryable' do
460
492
  let(:resource) {RDF::Node.new}
461
493
  subject {
462
494
  RDF::Graph.new do |graph|
463
- graph << [resource, RDF.type, RDF::DOAP.Project]
464
- graph << [resource, RDF::DC.creator, RDF::URI.new('http://example.org/#jhacker')]
465
- graph << [resource, RDF::DC.creator, literal]
495
+ graph << [resource, RDF.type, RDF::URI("http://usefulinc.com/ns/doap#Project")]
496
+ graph << [resource, RDF::URI("http://purl.org/dc/terms/creator"), RDF::URI.new('http://example.org/#jhacker')]
497
+ graph << [resource, RDF::URI("http://purl.org/dc/terms/creator"), literal]
466
498
  end
467
499
  }
468
- it {should respond_to(:first_literal)}
500
+ it {is_expected.to respond_to(:first_literal)}
469
501
 
470
502
  it "returns a literal without a pattern" do
471
503
  expect { subject.first_literal }.not_to raise_error
@@ -473,7 +505,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
473
505
  end
474
506
 
475
507
  it "returns the correct value when the pattern matches" do
476
- matching_patterns = [[nil, nil, nil], [resource, nil, nil], [nil, RDF::DC.creator, nil], [nil, nil, literal]]
508
+ matching_patterns = [[nil, nil, nil], [resource, nil, nil], [nil, RDF::URI("http://purl.org/dc/terms/creator"), nil], [nil, nil, literal]]
477
509
  matching_patterns.each do |matching_pattern|
478
510
  expect(subject.first_literal(matching_pattern)).to eq literal
479
511
  end
@@ -495,7 +527,7 @@ RSpec.shared_examples 'an RDF::Queryable' do
495
527
 
496
528
  describe "#first_value" do
497
529
  let(:failing_pattern) {[nil, nil, RDF::Node.new]}
498
- it {should respond_to(:first_value)}
530
+ it {is_expected.to respond_to(:first_value)}
499
531
 
500
532
  it "returns first literal without a pattern" do
501
533
  expect { subject.first_value }.not_to raise_error
@@ -1,7 +1,7 @@
1
1
  require 'rdf/spec'
2
2
 
3
3
  RSpec.shared_examples 'an RDF::Reader' do
4
- extend RSpec::SharedContext
4
+ include RDF::Spec::Matchers
5
5
 
6
6
  before(:each) do
7
7
  raise 'reader must be defined with let(:reader)' unless defined? reader
@@ -29,7 +29,7 @@ RSpec.shared_examples 'an RDF::Reader' do
29
29
  f.file_extensions.each_pair do |sym, content_type|
30
30
  reader_mock = double("reader")
31
31
  expect(reader_mock).to receive(:got_here)
32
- expect(reader_class).to receive(:for).with(:file_name => "foo.#{sym}").and_return(reader_class)
32
+ expect(reader_class).to receive(:for).with(file_name: "foo.#{sym}").and_return(reader_class)
33
33
  reader_class.open("foo.#{sym}") do |r|
34
34
  expect(r).to be_a(RDF::Reader)
35
35
  reader_mock.got_here
@@ -44,20 +44,20 @@ RSpec.shared_examples 'an RDF::Reader' do
44
44
  reader_mock = double("reader")
45
45
  expect(reader_mock).to receive(:got_here)
46
46
  expect(reader_class).to receive(:for).with(sym).and_return(reader_class)
47
- reader_class.open("foo.#{sym}", :format => sym) do |r|
47
+ reader_class.open("foo.#{sym}", format: sym) do |r|
48
48
  expect(r).to be_a(RDF::Reader)
49
49
  reader_mock.got_here
50
50
  end
51
51
  end
52
52
  end
53
53
 
54
- it "yields reader given {:file_name => file_name}" do
54
+ it "yields reader given {file_name: file_name}" do
55
55
  reader_class.format.each do |f|
56
56
  f.file_extensions.each_pair do |sym, content_type|
57
57
  reader_mock = double("reader")
58
58
  expect(reader_mock).to receive(:got_here)
59
- expect(reader_class).to receive(:for).with(:file_name => "foo.#{sym}").and_return(reader_class)
60
- reader_class.open("foo.#{sym}", :file_name => "foo.#{sym}") do |r|
59
+ expect(reader_class).to receive(:for).with(file_name: "foo.#{sym}").and_return(reader_class)
60
+ reader_class.open("foo.#{sym}", file_name: "foo.#{sym}") do |r|
61
61
  expect(r).to be_a(RDF::Reader)
62
62
  reader_mock.got_here
63
63
  end
@@ -65,13 +65,13 @@ RSpec.shared_examples 'an RDF::Reader' do
65
65
  end
66
66
  end
67
67
 
68
- it "yields reader given {:content_type => 'a/b'}" do
68
+ it "yields reader given {content_type: 'a/b'}" do
69
69
  reader_class.format.each do |f|
70
70
  f.content_types.each_pair do |content_type, formats|
71
71
  reader_mock = double("reader")
72
72
  expect(reader_mock).to receive(:got_here)
73
- expect(reader_class).to receive(:for).with(:content_type => content_type, :file_name => "foo").and_return(reader_class)
74
- reader_class.open("foo", :content_type => content_type) do |r|
73
+ expect(reader_class).to receive(:for).with(content_type: content_type, file_name: "foo").and_return(reader_class)
74
+ reader_class.open("foo", content_type: content_type) do |r|
75
75
  expect(r).to be_a(RDF::Reader)
76
76
  reader_mock.got_here
77
77
  end
@@ -107,44 +107,44 @@ RSpec.shared_examples 'an RDF::Reader' do
107
107
  end
108
108
  end
109
109
 
110
- it "sets validate given :validate => true" do
111
- reader_class.new(reader_input, :validate => true) do |r|
110
+ it "sets validate given validate: true" do
111
+ reader_class.new(reader_input, validate: true) do |r|
112
112
  expect(r).to be_valid
113
113
  end
114
114
  end
115
115
 
116
- it "sets canonicalize given :canonicalize => true" do
116
+ it "sets canonicalize given canonicalize: true" do
117
117
  reader_mock = double("reader")
118
118
  expect(reader_mock).to receive(:got_here)
119
- reader_class.new(reader_input, :canonicalize => true) do |r|
119
+ reader_class.new(reader_input, canonicalize: true) do |r|
120
120
  reader_mock.got_here
121
121
  expect(r).to be_canonicalize
122
122
  end
123
123
  end
124
124
 
125
- it "sets intern given :intern => true" do
125
+ it "sets intern given intern: true" do
126
126
  reader_mock = double("reader")
127
127
  expect(reader_mock).to receive(:got_here)
128
- reader_class.new(reader_input, :intern => true) do |r|
128
+ reader_class.new(reader_input, intern: true) do |r|
129
129
  reader_mock.got_here
130
130
  expect(r).to be_intern
131
131
  end
132
132
  end
133
133
 
134
- it "sets prefixes given :prefixes => {}" do
134
+ it "sets prefixes given prefixes: {}" do
135
135
  reader_mock = double("reader")
136
136
  expect(reader_mock).to receive(:got_here)
137
- reader_class.new(reader_input, :prefixes => {:a => "b"}) do |r|
137
+ reader_class.new(reader_input, prefixes: {a: "b"}) do |r|
138
138
  reader_mock.got_here
139
- expect(r.prefixes).to eq({:a => "b"})
139
+ expect(r.prefixes).to eq({a: "b"})
140
140
  end
141
141
  end
142
142
  end
143
143
 
144
144
  describe "#prefixes=" do
145
145
  it "sets prefixes from hash" do
146
- reader.prefixes = {:a => "b"}
147
- expect(reader.prefixes).to eq({:a => "b"})
146
+ reader.prefixes = {a: "b"}
147
+ expect(reader.prefixes).to eq({a: "b"})
148
148
  end
149
149
  end
150
150
 
@@ -6,44 +6,55 @@ require 'rdf/spec'
6
6
  shared_examples "an RDF::Transaction" do |klass|
7
7
  include RDF::Spec::Matchers
8
8
 
9
- subject {klass.new(:context => RDF::URI("name"), :insert => RDF::Graph.new, :delete => RDF::Graph.new)}
9
+ subject {klass.new(graph_name: RDF::URI("name"), inser: RDF::Graph.new, delete: RDF::Graph.new)}
10
10
 
11
11
  describe "#initialize" do
12
12
  subject {klass}
13
13
  it "accepts a graph" do
14
14
  g = double("graph")
15
- this = subject.new(:graph => g)
15
+ this = subject.new(graph: g)
16
16
  expect(this.graph).to eq g
17
17
  end
18
18
 
19
- it "accepts a context" do
19
+ it "accepts a context", unless: RDF::VERSION.to_s >= "1.99" do
20
20
  c = double("context")
21
- this = subject.new(:graph => c)
21
+ this = subject.new(graph: c)
22
22
  expect(this.graph).to eq c
23
23
  expect(this.context).to eq c
24
24
 
25
- this = subject.new(:context => c)
25
+ this = subject.new(context: c)
26
26
  expect(this.graph).to eq c
27
27
  expect(this.context).to eq c
28
28
  end
29
29
 
30
+ it "accepts a graph_name", if: RDF::VERSION.to_s >= "1.99" do
31
+ c = double("graph_name")
32
+ this = subject.new(graph: c)
33
+ expect(this.graph).to eq c
34
+ expect(this.graph_name).to eq c
35
+
36
+ this = subject.new(graph_name: c)
37
+ expect(this.graph).to eq c
38
+ expect(this.graph_name).to eq c
39
+ end
40
+
30
41
  it "accepts inserts" do
31
42
  g = double("inserts")
32
- this = subject.new(:insert => g)
43
+ this = subject.new(insert: g)
33
44
  expect(this.inserts).to eq g
34
45
  end
35
46
 
36
47
  it "accepts deletes" do
37
48
  g = double("deletes")
38
- this = subject.new(:delete => g)
49
+ this = subject.new(delete: g)
39
50
  expect(this.deletes).to eq g
40
51
  end
41
52
  end
42
53
 
43
- its(:deletes) {should be_a(RDF::Enumerable)}
44
- its(:inserts) {should be_a(RDF::Enumerable)}
45
- it {should be_mutable}
46
- it {should_not be_readable}
54
+ its(:deletes) {is_expected.to be_a(RDF::Enumerable)}
55
+ its(:inserts) {is_expected.to be_a(RDF::Enumerable)}
56
+ it {is_expected.to be_mutable}
57
+ it {is_expected.to_not be_readable}
47
58
 
48
59
  it "does not respond to #load" do
49
60
  expect {subject.load("http://example/")}.to raise_error(NoMethodError)
@@ -76,12 +87,12 @@ shared_examples "an RDF::Transaction" do |klass|
76
87
  end
77
88
 
78
89
  it "calls before_execute" do
79
- expect(subject).to receive(:before_execute).with(r, {})
90
+ is_expected.to receive(:before_execute).with(r, {})
80
91
  subject.execute(r)
81
92
  end
82
93
 
83
94
  it "calls after_execute" do
84
- expect(subject).to receive(:after_execute).with(r, {})
95
+ is_expected.to receive(:after_execute).with(r, {})
85
96
  subject.execute(r)
86
97
  end
87
98