[DRE-commits] [ruby-gitlab-emoji] 03/04: Port tests to rspec3 and merge patches

Balasankar C balasankarc-guest at moszumanska.debian.org
Wed Dec 9 04:45:31 UTC 2015


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

balasankarc-guest pushed a commit to branch master
in repository ruby-gitlab-emoji.

commit 70e96bcfc5fb0b7927fa5cab53acca379323a18a
Author: Balasankar C <balasankarc at autistici.org>
Date:   Wed Dec 9 10:10:23 2015 +0530

    Port tests to rspec3 and merge patches
---
 debian/patches/fix-size-test.patch | 15 ------------
 debian/patches/rspec3-port.patch   | 47 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  2 +-
 3 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/debian/patches/fix-size-test.patch b/debian/patches/fix-size-test.patch
deleted file mode 100644
index b33a652..0000000
--- a/debian/patches/fix-size-test.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://gitlab.com/gitlab-org/gitlab_emoji/issues/4
-
-Index: ruby-gitlab-emoji-0.1.1/spec/gitlab_emoji_spec.rb
-===================================================================
---- ruby-gitlab-emoji-0.1.1.orig/spec/gitlab_emoji_spec.rb
-+++ ruby-gitlab-emoji-0.1.1/spec/gitlab_emoji_spec.rb
-@@ -6,7 +6,7 @@ describe Emoji do
-     let(:emojis) { Emoji.emojis }
- 
-     it { emojis.should be_a(Hash) }
--    it { emojis.size.should eq(1058) }
-+    it { emojis.size.should >= 1058 }
-   end
- 
-   describe 'emojis_names' do
diff --git a/debian/patches/rspec3-port.patch b/debian/patches/rspec3-port.patch
new file mode 100644
index 0000000..2ef1470
--- /dev/null
+++ b/debian/patches/rspec3-port.patch
@@ -0,0 +1,47 @@
+Description: Fix tests and port it to RSpec 3 syntax
+ One of the tests had an incorrect equality check. Also, tests used older Rspec
+ syntax. Fixed these two.
+Author: Balasankar C <balasankarc at autistici.org>
+Bug: https://gitlab.com/gitlab-org/gitlab_emoji/issues/4
+Last-Update: 2015-12-09
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/gitlab_emoji_spec.rb
++++ b/spec/gitlab_emoji_spec.rb
+@@ -5,20 +5,20 @@
+   describe 'emojis' do
+     let(:emojis) { Emoji.emojis }
+ 
+-    it { emojis.should be_a(Hash) }
+-    it { emojis.size.should eq(1058) }
++    it { expect(emojis).to be_a(Hash) }
++    it { expect(emojis.size).to be >= 1058 }
+   end
+ 
+   describe 'emojis_names' do
+     subject { Emoji.emojis_names }
+ 
+-    it { should be_a(Array) }
+-    it { should include ("+1") }
++    it { is_expected.to be_a(Array) }
++    it { is_expected.to include ("+1") }
+   end
+ 
+   describe 'emoji_filename' do
+     subject { Emoji.emoji_filename("+1") }
+ 
+-    it { should eq("1F44D") }
++    it { is_expected.to eq("1F44D") }
+   end
+ end
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -5,7 +5,7 @@
+ #
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+ RSpec.configure do |config|
+-  config.treat_symbols_as_metadata_keys_with_true_values = true
++  # config.treat_symbols_as_metadata_keys_with_true_values = true
+   config.run_all_when_everything_filtered = true
+   config.filter_run :focus
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ed81d59..4a6c93e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-fix-size-test.patch
+rspec3-port.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gitlab-emoji.git



More information about the Pkg-ruby-extras-commits mailing list