puppet-retrospec 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +52 -0
- data/.gitlab-ci.yml +1 -0
- data/.overcommit.yml +33 -0
- data/.rubocop.yml +17 -3
- data/.rubocop_todo.yml +744 -0
- data/CHANGELOG.md +3 -1
- data/Gemfile +1 -4
- data/Gemfile.lock +34 -62
- data/README.md +2 -2
- data/Rakefile +3 -21
- data/lib/retrospec/plugins/v1/plugin/generators/fact_generator.rb +5 -5
- data/lib/retrospec/plugins/v1/plugin/generators/function_generator.rb +62 -18
- data/lib/retrospec/plugins/v1/plugin/generators/parsers/native_function.rb +58 -0
- data/lib/retrospec/plugins/v1/plugin/puppet.rb +1 -1
- data/lib/retrospec/plugins/v1/plugin/version.rb +1 -1
- data/puppet-retrospec.gemspec +5 -1648
- data/spec/fixtures/fixture_modules/sample_module/lib/puppet/functions/awesome_parser.rb +14 -0
- data/spec/fixtures/functions/abs.pp +4 -0
- data/spec/unit/generators/acceptance_generator_spec.rb +10 -14
- data/spec/unit/generators/definition_generator_spec.rb +4 -8
- data/spec/unit/generators/fact_generater_spec.rb +6 -7
- data/spec/unit/generators/function_generator_spec.rb +83 -17
- data/spec/unit/generators/function_spec.rb +1 -3
- data/spec/unit/generators/hostclass_generator_spec.rb +7 -10
- data/spec/unit/generators/node_generator_spec.rb +4 -7
- data/spec/unit/generators/parsers/fact_spec.rb +7 -10
- data/spec/unit/generators/parsers/provider_spec.rb +5 -5
- data/spec/unit/generators/parsers/type_spec.rb +8 -9
- data/spec/unit/generators/provider_generator_spec.rb +1 -2
- data/spec/unit/generators/report_generator_spec.rb +5 -7
- data/spec/unit/generators/resource_base_generator_spec.rb +3 -5
- data/spec/unit/generators/schema_generator_spec.rb +28 -32
- data/spec/unit/generators/serializers/rspec_dumper_spec.rb +35 -38
- data/spec/unit/generators/type_generator_spec.rb +116 -116
- data/spec/unit/plugin_spec.rb +15 -22
- data/spec/unit/puppet-retrospec_spec.rb +3 -5
- data/spec/unit/spec_object_spec.rb +17 -20
- metadata +9 -4
@@ -1,17 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Retrospec::Puppet::Generators::NodeGenerator do
|
4
|
-
|
5
4
|
after(:each) do
|
6
|
-
FileUtils.rm(spec_file) if File.
|
5
|
+
FileUtils.rm(spec_file) if File.exist?(spec_file)
|
7
6
|
end
|
8
7
|
|
9
8
|
let(:generator_opts) do
|
10
|
-
{:manifest_file => sample_file, :template_dir => retrospec_templates_path}
|
9
|
+
{ :manifest_file => sample_file, :template_dir => retrospec_templates_path }
|
11
10
|
end
|
12
11
|
|
13
12
|
let(:sample_file) do
|
14
|
-
File.join(module_path, 'manifests','node_file.pp')
|
13
|
+
File.join(module_path, 'manifests', 'node_file.pp')
|
15
14
|
end
|
16
15
|
|
17
16
|
let(:spec_files_path) do
|
@@ -36,7 +35,7 @@ describe Retrospec::Puppet::Generators::NodeGenerator do
|
|
36
35
|
|
37
36
|
xit 'should create spec file' do
|
38
37
|
expect(generator.run).to eq(spec_file)
|
39
|
-
expect(File.
|
38
|
+
expect(File.exist?(spec_file)).to eq(true)
|
40
39
|
end
|
41
40
|
|
42
41
|
xit 'should produce correct file name' do
|
@@ -48,7 +47,6 @@ describe Retrospec::Puppet::Generators::NodeGenerator do
|
|
48
47
|
expect(spec_file_contents).to eq(data)
|
49
48
|
end
|
50
49
|
|
51
|
-
|
52
50
|
describe 'spec files' do
|
53
51
|
let(:generated_files) do
|
54
52
|
[File.join(spec_files_path, 'site_spec.rb')]
|
@@ -58,5 +56,4 @@ describe Retrospec::Puppet::Generators::NodeGenerator do
|
|
58
56
|
expect(files).to eq(generated_files)
|
59
57
|
end
|
60
58
|
end
|
61
|
-
|
62
59
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'facter' do
|
4
4
|
let(:model) do
|
5
5
|
Retrospec::Puppet::Generators::Facter.load_fact(file)
|
6
6
|
end
|
7
7
|
|
8
8
|
describe 'node_role' do
|
9
9
|
let(:file) do
|
10
|
-
File.join(fixtures_facts_path
|
10
|
+
File.join(fixtures_facts_path, 'node_role.rb')
|
11
11
|
end
|
12
12
|
it 'can eval code' do
|
13
13
|
fact_name = model.facts.keys.first
|
@@ -16,16 +16,15 @@ describe "facter" do
|
|
16
16
|
confines = fact_data.confines
|
17
17
|
model_facts = model.facts[fact_name].used_facts
|
18
18
|
global_used_facts = model.global_used_facts
|
19
|
-
expect(confines).to eq(
|
19
|
+
expect(confines).to eq(:kernel => 'Windows', :is_virtual => true)
|
20
20
|
expect(model_facts).to eq({})
|
21
21
|
expect(global_used_facts).to eq({})
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
25
|
describe 'multiple facts' do
|
27
26
|
let(:file) do
|
28
|
-
File.join(fixtures_facts_path
|
27
|
+
File.join(fixtures_facts_path, 'datacenter_facts.rb')
|
29
28
|
end
|
30
29
|
|
31
30
|
it 'can eval code with multiple facts' do
|
@@ -35,7 +34,7 @@ describe "facter" do
|
|
35
34
|
confines = fact_data.confines
|
36
35
|
model_facts = fact_data.used_facts
|
37
36
|
expect(fact_name).to eq(:fact1)
|
38
|
-
expect(confines).to eq(
|
37
|
+
expect(confines).to eq(:kernel => 'Linux')
|
39
38
|
expect(model_facts).to eq({})
|
40
39
|
expect(global_used_facts).to eq({})
|
41
40
|
fact_name = model.facts.keys.last
|
@@ -43,7 +42,7 @@ describe "facter" do
|
|
43
42
|
confines = fact_data.confines
|
44
43
|
model_facts = fact_data.used_facts
|
45
44
|
expect(fact_name).to eq(:fact2)
|
46
|
-
expect(confines).to eq(
|
45
|
+
expect(confines).to eq(:kernel => 'Windows')
|
47
46
|
expect(model_facts).to eq({})
|
48
47
|
expect(global_used_facts).to eq({})
|
49
48
|
end
|
@@ -51,12 +50,10 @@ describe "facter" do
|
|
51
50
|
|
52
51
|
describe 'fact value' do
|
53
52
|
let(:file) do
|
54
|
-
File.join(fixtures_facts_path
|
53
|
+
File.join(fixtures_facts_path, 'facts_with_methods.rb')
|
55
54
|
end
|
56
55
|
it 'can be processed' do
|
57
56
|
expect(model).to_not eq(nil)
|
58
57
|
end
|
59
|
-
|
60
58
|
end
|
61
|
-
|
62
59
|
end
|
@@ -19,7 +19,7 @@ describe 'provider' do
|
|
19
19
|
|
20
20
|
it 'contains class methods' do
|
21
21
|
expect(models.class_methods).to match_array([:ipmitoolcmd, :instances, :prefetch, :laninfo,
|
22
|
-
|
22
|
+
:convert_vlanid, :convert_ip_source])
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'contains a file' do
|
@@ -28,10 +28,10 @@ describe 'provider' do
|
|
28
28
|
|
29
29
|
it 'contains instance methods' do
|
30
30
|
expect(models.instance_methods).to match_array([:ipmitoolcmd, :ensure, :ensure=, :ipsource,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
:ipsource=, :ip, :ip=, :netmask, :netmask=,
|
32
|
+
:gateway, :gateway=, :vlanid, :vlanid=,
|
33
|
+
:provider, :provider=, :flush, :install,
|
34
|
+
:remove, :exists?])
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'contains properties' do
|
@@ -75,19 +75,18 @@ describe 'type' do
|
|
75
75
|
|
76
76
|
it 'has correct amount of parameters' do
|
77
77
|
expect(models.parameters).to eq([:name,
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
78
|
+
:patch_id,
|
79
|
+
:os_user,
|
80
|
+
:oracle_product_home_dir,
|
81
|
+
:orainst_dir,
|
82
|
+
:extracted_patch_dir,
|
83
|
+
:ocmrf_file,
|
84
|
+
:opatch_auto,
|
85
|
+
:bundle_sub_patch_id])
|
86
86
|
end
|
87
87
|
|
88
88
|
it 'has the correct number of instance methods' do
|
89
89
|
expect(models.instance_methods).to eq([])
|
90
90
|
end
|
91
|
-
|
92
91
|
end
|
93
92
|
end
|
@@ -90,7 +90,6 @@ describe 'provider_generator' do
|
|
90
90
|
it 'return path of core type' do
|
91
91
|
expect(generator.type_file('package')).to eq('puppet/type/package.rb')
|
92
92
|
end
|
93
|
-
|
94
93
|
end
|
95
94
|
describe 'cli' do
|
96
95
|
it 'can run the cli options' do
|
@@ -111,7 +110,7 @@ describe 'provider_generator' do
|
|
111
110
|
|
112
111
|
it 'can generate a spec file' do
|
113
112
|
generator.generate_provider_files
|
114
|
-
files = [File.join(provider_spec_dir,
|
113
|
+
files = [File.join(provider_spec_dir, type_name.to_s, "#{provider_name}_spec.rb")]
|
115
114
|
expect(generator.generate_provider_spec_files).to eq(files)
|
116
115
|
end
|
117
116
|
|
@@ -1,14 +1,13 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'report_generator' do
|
4
|
-
|
5
4
|
after(:each) do
|
6
|
-
FileUtils.rm(report_file) if File.
|
7
|
-
FileUtils.rm(report_spec_file) if File.
|
5
|
+
FileUtils.rm(report_file) if File.exist?(report_file)
|
6
|
+
FileUtils.rm(report_spec_file) if File.exist?(report_spec_file)
|
8
7
|
end
|
9
8
|
|
10
9
|
let(:generator_opts) do
|
11
|
-
{:name => 'test',
|
10
|
+
{ :name => 'test', :template_dir => retrospec_templates_path }
|
12
11
|
end
|
13
12
|
|
14
13
|
let(:module_path) do
|
@@ -30,9 +29,9 @@ describe 'report_generator' do
|
|
30
29
|
it 'should create files without error' do
|
31
30
|
files = generator.run
|
32
31
|
expect(files.include?(report_file)).to eq(true)
|
33
|
-
expect(File.
|
32
|
+
expect(File.exist?(report_file)).to eq(true)
|
34
33
|
expect(files.include?(report_spec_file)).to eq(true)
|
35
|
-
expect(File.
|
34
|
+
expect(File.exist?(report_spec_file)).to eq(true)
|
36
35
|
end
|
37
36
|
|
38
37
|
it 'should produce correct file name' do
|
@@ -42,5 +41,4 @@ describe 'report_generator' do
|
|
42
41
|
it 'should produce correct spec file path' do
|
43
42
|
expect(generator.item_spec_path).to eq(report_spec_file)
|
44
43
|
end
|
45
|
-
|
46
44
|
end
|
@@ -1,17 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Retrospec::Puppet::Generators::ResourceBaseGenerator do
|
4
|
-
|
5
4
|
after(:each) do
|
6
|
-
FileUtils.rm_rf(spec_files_path) if File.
|
5
|
+
FileUtils.rm_rf(spec_files_path) if File.exist?(spec_files_path)
|
7
6
|
end
|
8
7
|
|
9
8
|
let(:generator_opts) do
|
10
|
-
{:manifest_file => sample_file, :template_dir => retrospec_templates_path}
|
9
|
+
{ :manifest_file => sample_file, :template_dir => retrospec_templates_path }
|
11
10
|
end
|
12
11
|
|
13
12
|
let(:sample_file) do
|
14
|
-
File.join(module_path, 'manifests','one_define.pp')
|
13
|
+
File.join(module_path, 'manifests', 'one_define.pp')
|
15
14
|
end
|
16
15
|
|
17
16
|
let(:spec_files_path) do
|
@@ -38,5 +37,4 @@ describe Retrospec::Puppet::Generators::ResourceBaseGenerator do
|
|
38
37
|
files = Retrospec::Puppet::Generators::ResourceBaseGenerator.generate_spec_files(module_path, generator_opts)
|
39
38
|
expect(files).to match_array(generated_files)
|
40
39
|
end
|
41
|
-
|
42
40
|
end
|
@@ -1,13 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'schema_generator' do
|
4
|
-
|
5
4
|
before(:each) do
|
6
|
-
FileUtils.rm(schema_file) if File.
|
5
|
+
FileUtils.rm(schema_file) if File.exist?(schema_file)
|
7
6
|
end
|
8
7
|
|
9
8
|
let(:generator_opts) do
|
10
|
-
{:name => 'test', :puppet_context => puppet_context,
|
9
|
+
{ :name => 'test', :puppet_context => puppet_context, :template_dir => template_dir }
|
11
10
|
end
|
12
11
|
|
13
12
|
let(:module_path) do
|
@@ -25,7 +24,7 @@ describe 'schema_generator' do
|
|
25
24
|
let(:puppet_context) do
|
26
25
|
path = File.join(fixture_modules_path, 'tomcat')
|
27
26
|
opts = { :module_path => path, :enable_beaker_tests => false, :name => 'name-test123',
|
28
|
-
|
27
|
+
:enable_user_templates => false, :template_dir => template_dir }
|
29
28
|
mod = Retrospec::Plugins::V1::Puppet.new(opts[:module_path], opts)
|
30
29
|
mod.post_init
|
31
30
|
mod.context
|
@@ -37,48 +36,46 @@ describe 'schema_generator' do
|
|
37
36
|
|
38
37
|
let(:hostclass_items) do
|
39
38
|
{
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
'tomcat::catalina_home' => { 'type' => 'any', 'required' => false },
|
40
|
+
'tomcat::user' => { 'type' => 'any', 'required' => false },
|
41
|
+
'tomcat::group' => { 'type' => 'any', 'required' => false },
|
42
|
+
'tomcat::install_from_source' => { 'type' => 'bool', 'required' => false },
|
43
|
+
'tomcat::purge_connectors' => { 'type' => 'bool', 'required' => false },
|
44
|
+
'tomcat::purge_realms' => { 'type' => 'bool', 'required' => false },
|
45
|
+
'tomcat::manage_user' => { 'type' => 'bool', 'required' => false },
|
46
|
+
'tomcat::manage_group' => { 'type' => 'bool', 'required' => false }
|
48
47
|
}
|
49
48
|
end
|
50
49
|
let(:schema_map) do
|
51
|
-
{
|
52
|
-
|
50
|
+
{ 'type' => 'map',
|
51
|
+
'mapping' =>
|
53
52
|
{
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
}
|
53
|
+
'definition' => {
|
54
|
+
'tomcat::war::catalina_base' => { 'type' => 'any', 'required' => false },
|
55
|
+
'tomcat::war::app_base' => { 'type' => 'any', 'required' => false },
|
56
|
+
'tomcat::war::deployment_path' => { 'type' => 'any', 'required' => false },
|
57
|
+
'tomcat::war::war_ensure' => { 'type' => 'str', 'required' => false },
|
58
|
+
'tomcat::war::war_name' => { 'type' => 'any', 'required' => false },
|
59
|
+
'tomcat::war::war_purge' => { 'type' => 'bool', 'required' => false },
|
60
|
+
'tomcat::war::war_source' => { 'type' => 'any', 'required' => false }
|
61
|
+
}
|
62
|
+
} }
|
65
63
|
end
|
66
64
|
|
67
65
|
it 'should create files without error' do
|
68
66
|
expect(generator.generate_schema_file).to eq(schema_file)
|
69
|
-
expect(File.
|
67
|
+
expect(File.exist?(schema_file)).to eq(true)
|
70
68
|
end
|
71
69
|
|
72
70
|
it 'should contain proper mapping' do
|
73
71
|
schema_file = generator.generate_schema_file
|
74
72
|
sch = YAML.load_file(schema_file)
|
75
|
-
expect(sch.keys).to eq(
|
76
|
-
expect(sch['mapping'].keys).to eq(
|
77
|
-
expect(sch['mapping']['hostclass'].keys).to eq(
|
78
|
-
expect(sch['mapping']['definition'].keys).to eq(
|
73
|
+
expect(sch.keys).to eq(%w(type mapping))
|
74
|
+
expect(sch['mapping'].keys).to eq(%w(hostclass definition))
|
75
|
+
expect(sch['mapping']['hostclass'].keys).to eq(%w(type mapping))
|
76
|
+
expect(sch['mapping']['definition'].keys).to eq(%w(type mapping))
|
79
77
|
expect(sch['mapping']['hostclass']['mapping']).to eq(hostclass_items)
|
80
78
|
expect(sch['mapping']['definition']['mapping'].keys.count).to eq(125)
|
81
|
-
|
82
79
|
end
|
83
80
|
|
84
81
|
it 'should produce correct file name' do
|
@@ -118,5 +115,4 @@ describe 'schema_generator' do
|
|
118
115
|
# it 'should detect when a parameter is required' do
|
119
116
|
# expect(generator.create_map_content).to eq(schema_map)
|
120
117
|
# end
|
121
|
-
|
122
118
|
end
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'retrospec/plugins/v1/plugin/generators/serializers/rspec_dumper'
|
3
3
|
|
4
4
|
describe 'rspec_serializer' do
|
5
|
-
|
6
5
|
let(:sample_file) do
|
7
6
|
File.join(fixtures_path, 'manifests', 'sql.pp')
|
8
7
|
end
|
@@ -30,25 +29,25 @@ describe 'rspec_serializer' do
|
|
30
29
|
|
31
30
|
let(:store) do
|
32
31
|
{
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
32
|
+
'$backup_root_dir' => { :value => 'c:\\backup', :type => :parameter },
|
33
|
+
'$features_location' => { :value => :undef, :type => :parameter },
|
34
|
+
'$install_account_passwords' => { :value => {}, :type => :parameter },
|
35
|
+
'$install_accounts' => { :value => {}, :type => :parameter },
|
36
|
+
'$install_options' => { :value => {}, :type => :parameter },
|
37
|
+
'$install_type' => { :value => 'default', :type => :parameter },
|
38
|
+
'$instance_name' => { :value => 'MSSQLSERVER', :type => :parameter },
|
39
|
+
'$source' => { :value => :undef, :type => :parameter },
|
40
|
+
'$sql::backup_root_dir' => { :value => 'c:\\backup', :type => :parameter },
|
41
|
+
'$sql::features_location' => { :value => :undef, :type => :parameter },
|
42
|
+
'$sql::install_account_passwords' => { :value => {}, :type => :parameter },
|
43
|
+
'$sql::install_accounts' => { :value => {}, :type => :parameter },
|
44
|
+
'$sql::install_options' => { :value => {}, :type => :parameter },
|
45
|
+
'$sql::install_type' => { :value => 'default', :type => :parameter },
|
46
|
+
'$sql::instance_name' => { :value => 'MSSQLSERVER', :type => :parameter },
|
47
|
+
'$sql::source' => { :value => :undef, :type => :parameter },
|
48
|
+
'$sql::ssdt_install_options' => { :value => {}, :type => :parameter },
|
49
|
+
'$ssdt_install_options' => { :value => {}, :type => :parameter },
|
50
|
+
'$value' => { :value => '$value', :type => :class_scope }
|
52
51
|
}
|
53
52
|
end
|
54
53
|
let(:hostclass_body) do
|
@@ -68,7 +67,7 @@ describe 'rspec_serializer' do
|
|
68
67
|
end
|
69
68
|
|
70
69
|
let(:case_exp) do
|
71
|
-
hostclass_body.statements.find {|s| s.class == Puppet::Pops::Model::CaseExpression}
|
70
|
+
hostclass_body.statements.find { |s| s.class == Puppet::Pops::Model::CaseExpression }
|
72
71
|
end
|
73
72
|
|
74
73
|
let(:case_opt) do
|
@@ -76,7 +75,7 @@ describe 'rspec_serializer' do
|
|
76
75
|
end
|
77
76
|
|
78
77
|
let(:resource_exp) do
|
79
|
-
|
78
|
+
relationship_exp.eContents.last
|
80
79
|
end
|
81
80
|
|
82
81
|
let(:relationship_exp) do
|
@@ -151,18 +150,18 @@ describe 'rspec_serializer' do
|
|
151
150
|
|
152
151
|
#
|
153
152
|
# not supported
|
154
|
-
# it 'case option' do
|
155
|
-
# # test = serializer.dump(case_exp.test)
|
156
|
-
# # ls, exp = case_exp.options.first.eContents
|
157
|
-
# # case_exp.options.first.eContents
|
158
|
-
# # options = case_exp.options
|
159
|
-
# # data = "context 'custom' do\n context blah do\n it { is_expected.to call(fail).with('Install type: default specified but no install options given')} \n end\nend"
|
160
|
-
# require 'pry'
|
161
|
-
# binding.pry
|
162
|
-
# data = ''
|
163
|
-
# expect(serializer.dump(case_opt)).to match(/context\ 'custom'\ do\n/)
|
164
|
-
# expect(serializer.dump(case_opt)).to eq(data)
|
165
|
-
# end
|
153
|
+
# it 'case option' do
|
154
|
+
# # test = serializer.dump(case_exp.test)
|
155
|
+
# # ls, exp = case_exp.options.first.eContents
|
156
|
+
# # case_exp.options.first.eContents
|
157
|
+
# # options = case_exp.options
|
158
|
+
# # data = "context 'custom' do\n context blah do\n it { is_expected.to call(fail).with('Install type: default specified but no install options given')} \n end\nend"
|
159
|
+
# require 'pry'
|
160
|
+
# binding.pry
|
161
|
+
# data = ''
|
162
|
+
# expect(serializer.dump(case_opt)).to match(/context\ 'custom'\ do\n/)
|
163
|
+
# expect(serializer.dump(case_opt)).to eq(data)
|
164
|
+
# end
|
166
165
|
|
167
166
|
# it 'if_expr' do
|
168
167
|
# if_expr = case_opt.then_expr.statements.first
|
@@ -239,7 +238,7 @@ describe 'rspec_serializer' do
|
|
239
238
|
|
240
239
|
it 'values should not contain a $' do
|
241
240
|
expect(serializer.add_var_to_store('class_a::master_type', 'value1')).to eq('value1')
|
242
|
-
serializer.var_store.each do |
|
241
|
+
serializer.var_store.each do |_key, value|
|
243
242
|
expect(value).to_not match(/^\$'.*/)
|
244
243
|
end
|
245
244
|
end
|
@@ -260,7 +259,7 @@ describe 'rspec_serializer' do
|
|
260
259
|
|
261
260
|
it 'values should not contain a $' do
|
262
261
|
expect(serializer.add_var_to_store('$master_type', 'value1')).to eq('value1')
|
263
|
-
serializer.var_store.each do |
|
262
|
+
serializer.var_store.each do |_key, value|
|
264
263
|
expect(value).to_not match(/^\$'.*/)
|
265
264
|
end
|
266
265
|
end
|
@@ -274,7 +273,6 @@ describe 'rspec_serializer' do
|
|
274
273
|
expect(serializer.add_var_to_store('$class_a::master_type', 'value1')).to eq('value1')
|
275
274
|
expect(serializer.lookup_var('$class_a::master_type')).to eq('value1')
|
276
275
|
expect(serializer.lookup_var('$master_type')).to eq('value1')
|
277
|
-
|
278
276
|
end
|
279
277
|
|
280
278
|
it 'should not add a variable when it already exists' do
|
@@ -292,7 +290,6 @@ describe 'rspec_serializer' do
|
|
292
290
|
expect(serializer.add_var_to_store('$class_a::master_type', 'value1')).to eq('value1')
|
293
291
|
expect(serializer.lookup_var('$class_a::master_type')).to eq('value1')
|
294
292
|
expect(serializer.lookup_var('$master_type')).to eq('value1')
|
295
|
-
|
296
293
|
end
|
297
294
|
|
298
295
|
it 'should not add a variable when it already exists' do
|