chefspec 9.2.1 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +16 -9
  3. data/Rakefile +60 -52
  4. data/chefspec.gemspec +20 -20
  5. data/lib/chefspec.rb +29 -29
  6. data/lib/chefspec/api.rb +14 -14
  7. data/lib/chefspec/api/core.rb +3 -3
  8. data/lib/chefspec/api/described.rb +3 -5
  9. data/lib/chefspec/api/stubs.rb +2 -2
  10. data/lib/chefspec/api/stubs_for.rb +12 -12
  11. data/lib/chefspec/berkshelf.rb +4 -4
  12. data/lib/chefspec/cacher.rb +2 -2
  13. data/lib/chefspec/coverage.rb +35 -40
  14. data/lib/chefspec/coverage/filters.rb +18 -15
  15. data/lib/chefspec/deprecations.rb +3 -3
  16. data/lib/chefspec/errors.rb +7 -7
  17. data/lib/chefspec/expect_exception.rb +2 -1
  18. data/lib/chefspec/extensions.rb +14 -14
  19. data/lib/chefspec/extensions/chef/client.rb +3 -3
  20. data/lib/chefspec/extensions/chef/conditional.rb +2 -1
  21. data/lib/chefspec/extensions/chef/cookbook/gem_installer.rb +5 -4
  22. data/lib/chefspec/extensions/chef/cookbook_loader.rb +1 -0
  23. data/lib/chefspec/extensions/chef/cookbook_uploader.rb +1 -1
  24. data/lib/chefspec/extensions/chef/data_query.rb +3 -3
  25. data/lib/chefspec/extensions/chef/lwrp_base.rb +1 -0
  26. data/lib/chefspec/extensions/chef/provider.rb +8 -5
  27. data/lib/chefspec/extensions/chef/resource.rb +14 -9
  28. data/lib/chefspec/extensions/chef/resource/freebsd_package.rb +2 -1
  29. data/lib/chefspec/extensions/chef/run_context/cookbook_compiler.rb +12 -1
  30. data/lib/chefspec/extensions/chef/securable.rb +1 -1
  31. data/lib/chefspec/extensions/ohai/system.rb +1 -1
  32. data/lib/chefspec/file_cache_path_proxy.rb +3 -3
  33. data/lib/chefspec/formatter.rb +3 -3
  34. data/lib/chefspec/librarian.rb +7 -6
  35. data/lib/chefspec/matchers.rb +9 -9
  36. data/lib/chefspec/matchers/do_nothing_matcher.rb +15 -15
  37. data/lib/chefspec/matchers/include_any_recipe_matcher.rb +4 -4
  38. data/lib/chefspec/matchers/include_recipe_matcher.rb +1 -1
  39. data/lib/chefspec/matchers/link_to_matcher.rb +2 -2
  40. data/lib/chefspec/matchers/notifications_matcher.rb +5 -4
  41. data/lib/chefspec/matchers/render_file_matcher.rb +3 -3
  42. data/lib/chefspec/matchers/resource_matcher.rb +18 -16
  43. data/lib/chefspec/mixins/normalize.rb +1 -1
  44. data/lib/chefspec/policyfile.rb +6 -6
  45. data/lib/chefspec/renderer.rb +4 -4
  46. data/lib/chefspec/rspec.rb +1 -1
  47. data/lib/chefspec/server.rb +1 -1
  48. data/lib/chefspec/server_methods.rb +8 -8
  49. data/lib/chefspec/server_runner.rb +10 -10
  50. data/lib/chefspec/solo_runner.rb +26 -24
  51. data/lib/chefspec/stubs/command_registry.rb +1 -1
  52. data/lib/chefspec/stubs/command_stub.rb +1 -1
  53. data/lib/chefspec/stubs/data_bag_item_registry.rb +1 -1
  54. data/lib/chefspec/stubs/data_bag_item_stub.rb +1 -1
  55. data/lib/chefspec/stubs/data_bag_registry.rb +1 -1
  56. data/lib/chefspec/stubs/data_bag_stub.rb +1 -1
  57. data/lib/chefspec/stubs/registry.rb +1 -1
  58. data/lib/chefspec/stubs/search_registry.rb +2 -2
  59. data/lib/chefspec/stubs/search_stub.rb +2 -2
  60. data/lib/chefspec/util.rb +7 -7
  61. data/lib/chefspec/version.rb +1 -1
  62. data/lib/chefspec/zero_server.rb +3 -3
  63. data/spec/spec_helper.rb +3 -4
  64. data/spec/support/hash.rb +3 -3
  65. data/spec/unit/cacher_spec.rb +17 -17
  66. data/spec/unit/coverage/filters_spec.rb +16 -16
  67. data/spec/unit/deprecations_spec.rb +8 -9
  68. data/spec/unit/errors_spec.rb +15 -15
  69. data/spec/unit/expect_exception_spec.rb +9 -9
  70. data/spec/unit/macros_spec.rb +50 -50
  71. data/spec/unit/matchers/do_nothing_matcher.rb +1 -1
  72. data/spec/unit/matchers/include_any_recipe_matcher_spec.rb +23 -23
  73. data/spec/unit/matchers/include_recipe_matcher_spec.rb +15 -15
  74. data/spec/unit/matchers/link_to_matcher_spec.rb +18 -18
  75. data/spec/unit/matchers/notifications_matcher_spec.rb +15 -16
  76. data/spec/unit/matchers/render_file_matcher_spec.rb +26 -26
  77. data/spec/unit/matchers/resource_matcher_spec.rb +1 -1
  78. data/spec/unit/matchers/state_attrs_matcher_spec.rb +24 -24
  79. data/spec/unit/matchers/subscribes_matcher_spec.rb +27 -29
  80. data/spec/unit/renderer_spec.rb +36 -36
  81. data/spec/unit/server_runner_spec.rb +6 -6
  82. data/spec/unit/solo_runner_spec.rb +69 -69
  83. data/spec/unit/stubs/command_registry_spec.rb +11 -11
  84. data/spec/unit/stubs/command_stub_spec.rb +26 -26
  85. data/spec/unit/stubs/data_bag_item_registry_spec.rb +17 -17
  86. data/spec/unit/stubs/data_bag_item_stub_spec.rb +14 -14
  87. data/spec/unit/stubs/data_bag_registry_spec.rb +16 -16
  88. data/spec/unit/stubs/data_bag_stub_spec.rb +13 -13
  89. data/spec/unit/stubs/registry_spec.rb +9 -9
  90. data/spec/unit/stubs/search_registry_spec.rb +17 -17
  91. data/spec/unit/stubs/search_stub_spec.rb +14 -14
  92. data/spec/unit/stubs/stub_spec.rb +22 -22
  93. metadata +6 -6
@@ -1,27 +1,27 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::CommandRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- command = double('command', command: 'test -f /var/www')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ command = double("command", command: "test -f /var/www")
13
13
  described_class.register(command)
14
- expect(described_class.stub_for('test -f /var/www')).to eq(command)
14
+ expect(described_class.stub_for("test -f /var/www")).to eq(command)
15
15
  end
16
16
 
17
- it 'finds a stub by regex' do
18
- command = double('command', command: /test -f (.+)/)
17
+ it "finds a stub by regex" do
18
+ command = double("command", command: /test -f (.+)/)
19
19
  described_class.register(command)
20
- expect(described_class.stub_for('test -f /var/www')).to eq(command)
20
+ expect(described_class.stub_for("test -f /var/www")).to eq(command)
21
21
  end
22
22
 
23
- it 'returns nil when no commands are matched' do
24
- expect(described_class.stub_for('which a2ensite')).to eq(nil)
23
+ it "returns nil when no commands are matched" do
24
+ expect(described_class.stub_for("which a2ensite")).to eq(nil)
25
25
  end
26
26
  end
27
27
  end
@@ -1,59 +1,59 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::CommandStub do
4
- describe '#initialize' do
5
- it 'sets the command and block' do
4
+ describe "#initialize" do
5
+ it "sets the command and block" do
6
6
  block = Proc.new {}
7
- stub = described_class.new('command', &block)
7
+ stub = described_class.new("command", &block)
8
8
 
9
- expect(stub.command).to eq('command')
9
+ expect(stub.command).to eq("command")
10
10
  expect(stub.block).to eq(block)
11
11
  end
12
12
  end
13
13
 
14
- describe '#and_return' do
15
- subject { described_class.new('command').and_return('value') }
14
+ describe "#and_return" do
15
+ subject { described_class.new("command").and_return("value") }
16
16
 
17
- it 'sets the value' do
18
- expect(subject.value).to eq('value')
17
+ it "sets the value" do
18
+ expect(subject.value).to eq("value")
19
19
  end
20
20
 
21
- it 'returns an instance of the stub' do
22
- expect(subject.and_return('value')).to be(subject)
21
+ it "returns an instance of the stub" do
22
+ expect(subject.and_return("value")).to be(subject)
23
23
  end
24
24
  end
25
25
 
26
- describe '#result' do
27
- context 'when a value is given' do
28
- subject { described_class.new('command').and_return('value') }
26
+ describe "#result" do
27
+ context "when a value is given" do
28
+ subject { described_class.new("command").and_return("value") }
29
29
 
30
- it 'returns the value' do
31
- expect(subject.result).to eq('value')
30
+ it "returns the value" do
31
+ expect(subject.result).to eq("value")
32
32
  end
33
33
  end
34
34
 
35
- context 'when a block is given' do
36
- subject { described_class.new('command') { 1 == 2 } }
35
+ context "when a block is given" do
36
+ subject { described_class.new("command") { 1 == 2 } }
37
37
 
38
- it 'calls the block' do
38
+ it "calls the block" do
39
39
  expect(subject.result).to eq(false)
40
40
  end
41
41
  end
42
42
  end
43
43
 
44
- describe '#signature' do
45
- context 'when a value is given' do
46
- subject { described_class.new('command').and_return(false) }
44
+ describe "#signature" do
45
+ context "when a value is given" do
46
+ subject { described_class.new("command").and_return(false) }
47
47
 
48
- it 'includes the value' do
48
+ it "includes the value" do
49
49
  expect(subject.signature).to eq('stub_command("command").and_return(false)')
50
50
  end
51
51
  end
52
52
 
53
- context 'when a block is given' do
54
- subject { described_class.new('command') { 1 == 2 } }
53
+ context "when a block is given" do
54
+ subject { described_class.new("command") { 1 == 2 } }
55
55
 
56
- it 'includes a comment about the block' do
56
+ it "includes a comment about the block" do
57
57
  expect(subject.signature).to eq('stub_command("command") { # Ruby code }')
58
58
  end
59
59
  end
@@ -1,39 +1,39 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagItemRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- search = double('search', bag: 'users', id: 'svargo')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ search = double("search", bag: "users", id: "svargo")
13
13
  described_class.register(search)
14
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
14
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
15
15
  end
16
16
 
17
- it 'finds a stub by Regex' do
18
- search = double('search', bag: 'users', id: /sv(.+)/)
17
+ it "finds a stub by Regex" do
18
+ search = double("search", bag: "users", id: /sv(.+)/)
19
19
  described_class.register(search)
20
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
20
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
21
21
  end
22
22
 
23
- it 'matches when the bag is a Symbol' do
24
- search = double('search', bag: :users, id: 'svargo')
23
+ it "matches when the bag is a Symbol" do
24
+ search = double("search", bag: :users, id: "svargo")
25
25
  described_class.register(search)
26
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
26
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
27
27
  end
28
28
 
29
- it 'matches when the stub is a Symbol' do
30
- search = double('search', bag: 'users', id: 'svargo')
29
+ it "matches when the stub is a Symbol" do
30
+ search = double("search", bag: "users", id: "svargo")
31
31
  described_class.register(search)
32
- expect(described_class.stub_for(:users, 'svargo')).to eq(search)
32
+ expect(described_class.stub_for(:users, "svargo")).to eq(search)
33
33
  end
34
34
 
35
- it 'returns nil when no searches are matched' do
36
- expect(described_class.stub_for('users', 'svargo')).to eq(nil)
35
+ it "returns nil when no searches are matched" do
36
+ expect(described_class.stub_for("users", "svargo")).to eq(nil)
37
37
  end
38
38
  end
39
39
  end
@@ -1,34 +1,34 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagItemStub do
4
- it 'inherts from Stub' do
4
+ it "inherts from Stub" do
5
5
  expect(described_class.superclass).to be(ChefSpec::Stubs::Stub)
6
6
  end
7
7
 
8
- describe '#initialize' do
9
- it 'sets the bag, id, and block' do
8
+ describe "#initialize" do
9
+ it "sets the bag, id, and block" do
10
10
  block = Proc.new {}
11
- stub = described_class.new('bag', 'id', &block)
11
+ stub = described_class.new("bag", "id", &block)
12
12
 
13
- expect(stub.bag).to eq('bag')
14
- expect(stub.id).to eq('id')
13
+ expect(stub.bag).to eq("bag")
14
+ expect(stub.id).to eq("id")
15
15
  expect(stub.block).to eq(block)
16
16
  end
17
17
  end
18
18
 
19
- describe '#signature' do
20
- context 'when a value is given' do
21
- subject { described_class.new('bag', 'id').and_return(false) }
19
+ describe "#signature" do
20
+ context "when a value is given" do
21
+ subject { described_class.new("bag", "id").and_return(false) }
22
22
 
23
- it 'includes the value' do
23
+ it "includes the value" do
24
24
  expect(subject.signature).to eq('stub_data_bag_item("bag", "id").and_return(false)')
25
25
  end
26
26
  end
27
27
 
28
- context 'when a block is given' do
29
- subject { described_class.new('bag', 'id') { 1 == 2 } }
28
+ context "when a block is given" do
29
+ subject { described_class.new("bag", "id") { 1 == 2 } }
30
30
 
31
- it 'includes a comment about the block' do
31
+ it "includes a comment about the block" do
32
32
  expect(subject.signature).to eq('stub_data_bag_item("bag", "id") { # Ruby code }')
33
33
  end
34
34
  end
@@ -1,39 +1,39 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- search = double('search', bag: 'users')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ search = double("search", bag: "users")
13
13
  described_class.register(search)
14
- expect(described_class.stub_for('users')).to eq(search)
14
+ expect(described_class.stub_for("users")).to eq(search)
15
15
  end
16
16
 
17
- it 'finds a stub by Regex' do
18
- search = double('search', bag: 'users')
17
+ it "finds a stub by Regex" do
18
+ search = double("search", bag: "users")
19
19
  described_class.register(search)
20
- expect(described_class.stub_for('users')).to eq(search)
20
+ expect(described_class.stub_for("users")).to eq(search)
21
21
  end
22
22
 
23
- it 'matches when the bag is Symbol' do
24
- search = double('search', bag: :users)
23
+ it "matches when the bag is Symbol" do
24
+ search = double("search", bag: :users)
25
25
  described_class.register(search)
26
- expect(described_class.stub_for('users')).to eq(search)
26
+ expect(described_class.stub_for("users")).to eq(search)
27
27
  end
28
28
 
29
- it 'matches when the stub is Symbol' do
30
- search = double('search', bag: 'users')
29
+ it "matches when the stub is Symbol" do
30
+ search = double("search", bag: "users")
31
31
  described_class.register(search)
32
32
  expect(described_class.stub_for(:users)).to eq(search)
33
33
  end
34
34
 
35
- it 'returns nil when no searches are matched' do
36
- expect(described_class.stub_for('users')).to eq(nil)
35
+ it "returns nil when no searches are matched" do
36
+ expect(described_class.stub_for("users")).to eq(nil)
37
37
  end
38
38
  end
39
39
  end
@@ -1,33 +1,33 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagStub do
4
- it 'inherts from Stub' do
4
+ it "inherts from Stub" do
5
5
  expect(described_class.superclass).to be(ChefSpec::Stubs::Stub)
6
6
  end
7
7
 
8
- describe '#initialize' do
9
- it 'sets the bag and block' do
8
+ describe "#initialize" do
9
+ it "sets the bag and block" do
10
10
  block = Proc.new {}
11
- stub = described_class.new('bag', &block)
11
+ stub = described_class.new("bag", &block)
12
12
 
13
- expect(stub.bag).to eq('bag')
13
+ expect(stub.bag).to eq("bag")
14
14
  expect(stub.block).to eq(block)
15
15
  end
16
16
  end
17
17
 
18
- describe '#signature' do
19
- context 'when a value is given' do
20
- subject { described_class.new('bag').and_return(false) }
18
+ describe "#signature" do
19
+ context "when a value is given" do
20
+ subject { described_class.new("bag").and_return(false) }
21
21
 
22
- it 'includes the value' do
22
+ it "includes the value" do
23
23
  expect(subject.signature).to eq('stub_data_bag("bag").and_return(false)')
24
24
  end
25
25
  end
26
26
 
27
- context 'when a block is given' do
28
- subject { described_class.new('bag') { 1 == 2 } }
27
+ context "when a block is given" do
28
+ subject { described_class.new("bag") { 1 == 2 } }
29
29
 
30
- it 'includes a comment about the block' do
30
+ it "includes a comment about the block" do
31
31
  expect(subject.signature).to eq('stub_data_bag("bag") { # Ruby code }')
32
32
  end
33
33
  end
@@ -1,10 +1,10 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::Registry do
4
4
  before { described_class.reset! }
5
5
 
6
- describe '#reset!' do
7
- it 'cleans the list of stubs' do
6
+ describe "#reset!" do
7
+ it "cleans the list of stubs" do
8
8
  described_class.stubs = [1, 2, 3]
9
9
  described_class.reset!
10
10
 
@@ -12,15 +12,15 @@ describe ChefSpec::Stubs::Registry do
12
12
  end
13
13
  end
14
14
 
15
- describe '#register' do
16
- it 'adds the stub to the registry' do
17
- described_class.register('bacon')
18
- expect(described_class.stubs).to include('bacon')
15
+ describe "#register" do
16
+ it "adds the stub to the registry" do
17
+ described_class.register("bacon")
18
+ expect(described_class.stubs).to include("bacon")
19
19
  end
20
20
  end
21
21
 
22
- describe '#stub_for' do
23
- it 'finds a stub by name' do
22
+ describe "#stub_for" do
23
+ it "finds a stub by name" do
24
24
  expect {
25
25
  described_class.stub_for
26
26
  }.to raise_error(ArgumentError)
@@ -1,39 +1,39 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::SearchRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- search = double('search', type: 'node', query: '*:*')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ search = double("search", type: "node", query: "*:*")
13
13
  described_class.register(search)
14
- expect(described_class.stub_for('node', '*:*')).to eq(search)
14
+ expect(described_class.stub_for("node", "*:*")).to eq(search)
15
15
  end
16
16
 
17
- it 'finds a stub by Regex' do
18
- search = double('search', type: 'node', query: /name:(.+)/)
17
+ it "finds a stub by Regex" do
18
+ search = double("search", type: "node", query: /name:(.+)/)
19
19
  described_class.register(search)
20
- expect(described_class.stub_for('node', 'name:example.com')).to eq(search)
20
+ expect(described_class.stub_for("node", "name:example.com")).to eq(search)
21
21
  end
22
22
 
23
- it 'matches when the type is Symbol' do
24
- search = double('search', type: :node, query: '*:*')
23
+ it "matches when the type is Symbol" do
24
+ search = double("search", type: :node, query: "*:*")
25
25
  described_class.register(search)
26
- expect(described_class.stub_for('node', '*:*')).to eq(search)
26
+ expect(described_class.stub_for("node", "*:*")).to eq(search)
27
27
  end
28
28
 
29
- it 'matches when the stub is Symbol' do
30
- search = double('search', type: 'node', query: '*:*')
29
+ it "matches when the stub is Symbol" do
30
+ search = double("search", type: "node", query: "*:*")
31
31
  described_class.register(search)
32
- expect(described_class.stub_for(:node, '*:*')).to eq(search)
32
+ expect(described_class.stub_for(:node, "*:*")).to eq(search)
33
33
  end
34
34
 
35
- it 'returns nil when no searches are matched' do
36
- expect(described_class.stub_for('node', 'name:example.com')).to eq(nil)
35
+ it "returns nil when no searches are matched" do
36
+ expect(described_class.stub_for("node", "name:example.com")).to eq(nil)
37
37
  end
38
38
  end
39
39
  end
@@ -1,34 +1,34 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::SearchStub do
4
- it 'inherts from Stub' do
4
+ it "inherts from Stub" do
5
5
  expect(described_class.superclass).to be(ChefSpec::Stubs::Stub)
6
6
  end
7
7
 
8
- describe '#initialize' do
9
- it 'sets the type, query, and block' do
8
+ describe "#initialize" do
9
+ it "sets the type, query, and block" do
10
10
  block = Proc.new {}
11
- stub = described_class.new('type', 'query', &block)
11
+ stub = described_class.new("type", "query", &block)
12
12
 
13
- expect(stub.type).to eq('type')
14
- expect(stub.query).to eq('query')
13
+ expect(stub.type).to eq("type")
14
+ expect(stub.query).to eq("query")
15
15
  expect(stub.block).to eq(block)
16
16
  end
17
17
  end
18
18
 
19
- describe '#signature' do
20
- context 'when a value is given' do
21
- subject { described_class.new('type', 'query').and_return(false) }
19
+ describe "#signature" do
20
+ context "when a value is given" do
21
+ subject { described_class.new("type", "query").and_return(false) }
22
22
 
23
- it 'includes the value' do
23
+ it "includes the value" do
24
24
  expect(subject.signature).to eq('stub_search("type", "query").and_return(false)')
25
25
  end
26
26
  end
27
27
 
28
- context 'when a block is given' do
29
- subject { described_class.new('type', 'query') { 1 == 2 } }
28
+ context "when a block is given" do
29
+ subject { described_class.new("type", "query") { 1 == 2 } }
30
30
 
31
- it 'includes a comment about the block' do
31
+ it "includes a comment about the block" do
32
32
  expect(subject.signature).to eq('stub_search("type", "query") { # Ruby code }')
33
33
  end
34
34
  end