[Pkg-puppet-devel] [facter] 170/352: (maint) Remove normalization tests from resolvable

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit ddfd832c3f19d892a1438354d98d7d7db5929d58
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Thu Jan 16 12:10:54 2014 -0800

    (maint) Remove normalization tests from resolvable
---
 spec/unit/core/resolvable_spec.rb | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

diff --git a/spec/unit/core/resolvable_spec.rb b/spec/unit/core/resolvable_spec.rb
index 69d9c33..5555974 100644
--- a/spec/unit/core/resolvable_spec.rb
+++ b/spec/unit/core/resolvable_spec.rb
@@ -23,32 +23,15 @@ describe Facter::Core::Resolvable do
   end
 
   describe "generating a value" do
-    let(:fact_value) { "" }
-
-    let(:utf16_string) do
-      if String.method_defined?(:encode) && defined?(::Encoding)
-        fact_value.encode(Encoding::UTF_16LE).freeze
-      else
-        [0x00, 0x00].pack('C*').freeze
-      end
-    end
-
-    let(:expected_value) do
-      if String.method_defined?(:encode) && defined?(::Encoding)
-        fact_value.encode(Encoding::UTF_8).freeze
-      else
-        [0x00, 0x00].pack('C*').freeze
-      end
-    end
-
     it "returns the results of #resolve_value" do
       subject.resolve_value = 'stuff'
       expect(subject.value).to eq 'stuff'
     end
 
     it "normalizes the resolved value" do
-      subject.resolve_value = fact_value
-      expect(subject.value).to eq(expected_value)
+      Facter::Util::Normalization.expects(:normalize).returns 'stuff'
+      subject.resolve_value = 'stuff'
+      expect(subject.value).to eq('stuff')
     end
 
     it "returns nil if an exception was raised" do

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list