mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Finish rename of example -> example-tmp.rb
Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
parent
9e1a380f0a
commit
ae3ee6f657
3 changed files with 6 additions and 6 deletions
|
@ -84,7 +84,7 @@ module FunctionalHelper
|
|||
|
||||
let(:example_profile) { File.join(examples_path, "profile") }
|
||||
let(:meta_profile) { File.join(examples_path, "meta-profile") }
|
||||
let(:example_control) { File.join(example_profile, "controls", "example.rb") }
|
||||
let(:example_control) { File.join(example_profile, "controls", "example-tmp.rb") }
|
||||
let(:inheritance_profile) { File.join(examples_path, "inheritance") }
|
||||
let(:failure_control) { File.join(profile_path, "failures", "controls", "failures.rb") }
|
||||
let(:simple_inheritance) { File.join(profile_path, "simple-inheritance") }
|
||||
|
|
|
@ -137,7 +137,7 @@ describe "inspec exec with json formatter" do
|
|||
it "has all the metadata" do
|
||||
actual = profile.dup
|
||||
key = actual.delete("controls")
|
||||
.find { |x| x["id"] =~ /generated from example.rb/ }["id"]
|
||||
.find { |x| p x; x["id"] =~ /generated from example/ }["id"]
|
||||
groups = actual.delete("groups")
|
||||
_(actual).must_equal({
|
||||
"name" => "profile",
|
||||
|
@ -156,7 +156,7 @@ describe "inspec exec with json formatter" do
|
|||
})
|
||||
|
||||
_(groups.sort_by { |x| x["id"] }).must_equal([
|
||||
{ "id" => "controls/example.rb", "title" => "/tmp profile", "controls" => ["tmp-1.0", key] },
|
||||
{ "id" => "controls/example-tmp.rb", "title" => "/tmp profile", "controls" => ["tmp-1.0", key] },
|
||||
{ "id" => "controls/example.rb", "title" => "Example Config Checks", "controls" => ["example-1.0"] },
|
||||
{ "id" => "controls/meta.rb", "title" => "SSH Server Configuration", "controls" => ["ssh-1"] },
|
||||
])
|
||||
|
@ -180,7 +180,7 @@ describe "inspec exec with json formatter" do
|
|||
actual = ex1.dup
|
||||
|
||||
src = actual.delete("source_location")
|
||||
_(src["ref"]).must_match %r{test/unit/mock/profiles/old-examples/profile/controls/example.rb$}
|
||||
_(src["ref"]).must_match %r{test/unit/mock/profiles/old-examples/profile/controls/example-tmp.rb$}
|
||||
_(src["line"]).must_equal 6
|
||||
|
||||
result = actual.delete("results")[0]
|
||||
|
|
|
@ -73,7 +73,7 @@ describe "inspec json" do
|
|||
end
|
||||
|
||||
it "has a source location" do
|
||||
loc = File.join(example_profile, "/controls/example.rb")
|
||||
loc = File.join(example_profile, "/controls/example-tmp.rb")
|
||||
_(control["source_location"]["ref"]).must_equal loc
|
||||
_(control["source_location"]["line"]).must_equal 6
|
||||
end
|
||||
|
@ -98,7 +98,7 @@ describe "inspec json" do
|
|||
_(json["controls"].length).must_equal 1
|
||||
_(json["controls"][0]["id"]).must_equal "tmp-1.0"
|
||||
_(json["groups"].length).must_equal 1
|
||||
_(json["groups"][0]["id"]).must_equal "controls/example.rb"
|
||||
_(json["groups"][0]["id"]).must_equal "controls/example-tmp.rb"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue