Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2022-03-04 16:49:20 -05:00 committed by Sonu Saha
parent bbdbc5c6b7
commit d78acc03ba
3 changed files with 3 additions and 4 deletions

View file

@ -4,7 +4,7 @@ require "inspec/globals"
require "#{Inspec.src_root}/test/helper" require "#{Inspec.src_root}/test/helper"
# Load (require) the resource library file # Load (require) the resource library file
require_relative "<%= layout == "core" ? "../../../lib/inspec/resources/" : "../../libraries/" %><%= resource_name %>.rb" require_relative "<%= layout == "core" ? "../../../lib/inspec/resources/" : "../../libraries/" %><%= resource_name %>"
describe Inspec::Resources::<%= class_name %> do describe Inspec::Resources::<%= class_name %> do
it "works correctly with the constructor on the platform" do it "works correctly with the constructor on the platform" do

View file

@ -11,7 +11,6 @@
# https://github.com/inspec/inspec/blob/main/dev-docs/filtertable-usage.md # https://github.com/inspec/inspec/blob/main/dev-docs/filtertable-usage.md
# Consider that page required reading for authoring plural resources. # Consider that page required reading for authoring plural resources.
# Uncomment the below lines to add gems and files required by the resource # Uncomment the below lines to add gems and files required by the resource
# require "inspec/utils/filter" # require "inspec/utils/filter"
# require_relative "" # require_relative ""
@ -52,7 +51,7 @@ module Inspec::Resources
# where(), count(), and a property for every column. # where(), count(), and a property for every column.
table = FilterTable.create table = FilterTable.create
table.register_column(:names, field: :name, style: :simple) table.register_column(:names, field: :name, style: :simple)
.register_column(:shoe_sizes, field: :shoe_size) .register_column(:shoe_sizes, field: :shoe_size)
.install_filter_methods_on_resource(self, :fetch_data) .install_filter_methods_on_resource(self, :fetch_data)
# Plural resources do not generally define a resource_id. # Plural resources do not generally define a resource_id.

View file

@ -4,7 +4,7 @@ require "inspec/globals"
require "#{Inspec.src_root}/test/helper" require "#{Inspec.src_root}/test/helper"
# Load (require) the resource library file # Load (require) the resource library file
require_relative "<%= layout == "core" ? "../../../lib/inspec/resources/" : "../../libraries/" %><%= resource_name %>.rb" require_relative "<%= layout == "core" ? "../../../lib/inspec/resources/" : "../../libraries/" %><%= resource_name %>"
describe Inspec::Resources::<%= class_name %> do describe Inspec::Resources::<%= class_name %> do
it "works correctly with the constructor on the platform" do it "works correctly with the constructor on the platform" do