[DRE-commits] [ruby-api-pagination] 07/07: make sure the test suite does not require PAGINATOR to be set
Antonio Terceiro
terceiro at moszumanska.debian.org
Thu Feb 4 13:23:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-api-pagination.
commit cce076a38a97d87e7abc73c0415528a4e5f6ea96
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Feb 4 11:19:42 2016 -0200
make sure the test suite does not require PAGINATOR to be set
This make the test pass under CI
---
...-running-test-suite-without-PAGINATOR-set.patch | 30 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 2 --
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/debian/patches/0001-Allow-running-test-suite-without-PAGINATOR-set.patch b/debian/patches/0001-Allow-running-test-suite-without-PAGINATOR-set.patch
new file mode 100644
index 0000000..17aab51
--- /dev/null
+++ b/debian/patches/0001-Allow-running-test-suite-without-PAGINATOR-set.patch
@@ -0,0 +1,30 @@
+From: Antonio Terceiro <terceiro at softwarelivre.org>
+Date: Thu, 4 Feb 2016 11:14:20 -0200
+Subject: Allow running test suite without PAGINATOR set
+
+kaminari is the default, so let's assume that. Otherwise, if PAGINATOR
+is not set while running the test suite, you will always get a failure
+like this:
+
+ 1) ApiPagination Using kaminari should accept paginate_array_options option
+ Failure/Error: ApiPagination.config.paginator = ENV['PAGINATOR'].to_sym
+ NoMethodError:
+ undefined method `to_sym' for nil:NilClass
+ # ./spec/api-pagination_spec.rb:13:in `block (3 levels) in <top (required)>'
+---
+ spec/api-pagination_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/api-pagination_spec.rb b/spec/api-pagination_spec.rb
+index 998fcea..adcc887 100644
+--- a/spec/api-pagination_spec.rb
++++ b/spec/api-pagination_spec.rb
+@@ -10,7 +10,7 @@ describe ApiPagination do
+ end
+
+ after do
+- ApiPagination.config.paginator = ENV['PAGINATOR'].to_sym
++ ApiPagination.config.paginator = ENV.fetch('PAGINATOR', 'kaminari').to_sym
+ end
+
+ it 'should accept paginate_array_options option' do
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..12249dd
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Allow-running-test-suite-without-PAGINATOR-set.patch
diff --git a/debian/rules b/debian/rules
index 2edc944..3454d59 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,5 @@
export GEM2DEB_TEST_RUNNER = --check-dependencies
-export PAGINATOR = kaminari
-
%:
dh $@ --buildsystem=ruby --with ruby
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-api-pagination.git
More information about the Pkg-ruby-extras-commits
mailing list