[DRE-commits] [ohai] 12/12: make the tests not depend on an unpackage rspec extension
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Jun 13 18:36:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ohai.
commit 608e64ca55362bccfde21fe9ed1f3361de30d28e
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Jun 13 15:32:34 2015 -0300
make the tests not depend on an unpackage rspec extension
---
debian/changelog | 2 +
...d-dependency-on-rspec-collection_matchers.patch | 58 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 61 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index bdc11c0..850c383 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ ohai (8.4.0-1) UNRELEASED; urgency=medium
* Update packaging with a new dh-make-ruby run
* Add 0001-Drop-dependency-on-wmi-lite.patch to remove a Windows-only
dependency
+ * Add 0002-Avoid-dependency-on-rspec-collection_matchers.patch to make the
+ tests not depend on an unpackage rspec extension.
-- Antonio Terceiro <terceiro at debian.org> Sat, 13 Jun 2015 12:27:47 -0300
diff --git a/debian/patches/0002-Avoid-dependency-on-rspec-collection_matchers.patch b/debian/patches/0002-Avoid-dependency-on-rspec-collection_matchers.patch
new file mode 100644
index 0000000..11ff06d
--- /dev/null
+++ b/debian/patches/0002-Avoid-dependency-on-rspec-collection_matchers.patch
@@ -0,0 +1,58 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Sat, 13 Jun 2015 15:29:00 -0300
+Subject: Avoid dependency on rspec-collection_matchers
+
+That extra dependency is used only for 3 tests. If
+rspec-collection_matchers ever gets packaged, this patch can be dropped.
+---
+ spec/spec_helper.rb | 2 +-
+ spec/unit/plugins/solaris2/kernel_spec.rb | 2 +-
+ spec/unit/provides_map_spec.rb | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index c829eff..1abcdf0 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,5 +1,5 @@
+ require 'rspec'
+-require 'rspec/collection_matchers'
++#require 'rspec/collection_matchers'
+
+ # require 'pry-debugger'
+ # require 'pry-stack_explorer'
+diff --git a/spec/unit/plugins/solaris2/kernel_spec.rb b/spec/unit/plugins/solaris2/kernel_spec.rb
+index 729b20a..4bab5b8 100644
+--- a/spec/unit/plugins/solaris2/kernel_spec.rb
++++ b/spec/unit/plugins/solaris2/kernel_spec.rb
+@@ -146,7 +146,7 @@ describe Ohai::System, "Solaris2.X kernel plugin" do
+ it "gives excruciating detail about kernel modules" do
+ @plugin.run
+
+- expect(@plugin[:kernel][:modules]).to have(107).modules
++ expect(@plugin[:kernel][:modules].size).to eq(107)
+
+ # Teh daterz
+ # Id Loadaddr Size Info Rev Module Name
+diff --git a/spec/unit/provides_map_spec.rb b/spec/unit/provides_map_spec.rb
+index 9fa9a8f..8c4c98e 100644
+--- a/spec/unit/provides_map_spec.rb
++++ b/spec/unit/provides_map_spec.rb
+@@ -125,7 +125,7 @@ describe Ohai::ProvidesMap do
+
+ it "should find providers for subattributes if any exists when the attribute doesn't have a provider" do
+ providers = provides_map.deep_find_providers_for(["cat"])
+- expect(providers).to have(3).plugins
++ expect(providers.size).to eq(3)
+ expect(providers).to include(plugin_1)
+ expect(providers).to include(plugin_2)
+ expect(providers).to include(plugin_3)
+@@ -182,7 +182,7 @@ describe Ohai::ProvidesMap do
+
+ it "should find all the plugins providing attributes" do
+ all_plugins = provides_map.all_plugins
+- expect(all_plugins).to have(4).plugins
++ expect(all_plugins.size).to eq(4)
+ expect(all_plugins).to include(plugin_1)
+ expect(all_plugins).to include(plugin_2)
+ expect(all_plugins).to include(plugin_3)
diff --git a/debian/patches/series b/debian/patches/series
index ff6f644..8e72fd8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Drop-dependency-on-wmi-lite.patch
+0002-Avoid-dependency-on-rspec-collection_matchers.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ohai.git
More information about the Pkg-ruby-extras-commits
mailing list