summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-07-09 13:15:52 -0700
committerTim Smith <tsmith84@gmail.com>2020-07-09 13:15:52 -0700
commit3f4177a54aa7db9c0192dc45bce31622d1c214d3 (patch)
tree82f3405b219c732ea151b3fec55cfa526d2bd61a
parentd8a842e3541447b91f85c5258de2fcc88a896c09 (diff)
downloadchef-3f4177a54aa7db9c0192dc45bce31622d1c214d3.tar.gz
Disable Naming/AsciiIdentifiers in our specs
RuboCop 0.87 expanded this cop to detect these uses of non-ASCII characters. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/integration/recipes/recipe_dsl_spec.rb2
-rw-r--r--spec/unit/property_spec.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb
index 7db5599db5..797e9ecb70 100644
--- a/spec/integration/recipes/recipe_dsl_spec.rb
+++ b/spec/integration/recipes/recipe_dsl_spec.rb
@@ -1221,7 +1221,7 @@ describe "Recipe DSL methods" do
it "utf-8 dsl names work" do
recipe = converge do
- Straße("blah") {}
+ Straße("blah") {} # rubocop: disable Naming/AsciiIdentifiers
end
expect(recipe.logged_warnings).to eq ""
expect(BaseThingy.created_resource).to eq(UTF8Thingy)
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index a488567300..6c64a961b4 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -111,11 +111,11 @@ describe "Chef::Resource.property" do
with_property ":Straße" do
it "properties with UTF-8 in their name work" do
- expect(resource.Straße).to eql(nil)
- expect(resource.Straße "foo").to eql("foo")
- expect(resource.Straße).to eql("foo")
- expect(resource.Straße = "bar").to eql("bar")
- expect(resource.Straße).to eql("bar")
+ expect(resource.Straße).to eql(nil) # rubocop: disable Naming/AsciiIdentifiers
+ expect(resource.Straße "foo").to eql("foo") # rubocop: disable Naming/AsciiIdentifiers
+ expect(resource.Straße).to eql("foo") # rubocop: disable Naming/AsciiIdentifiers
+ expect(resource.Straße = "bar").to eql("bar") # rubocop: disable Naming/AsciiIdentifiers
+ expect(resource.Straße).to eql("bar") # rubocop: disable Naming/AsciiIdentifiers
end
end