[DRE-commits] [ruby-omniauth-github] 01/03: Basic RSpec3 support

Cédric Boutillier boutil at moszumanska.debian.org
Wed Aug 12 15:45:17 UTC 2015


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

boutil pushed a commit to annotated tag debian/1.1.2-2
in repository ruby-omniauth-github.

commit f6d78d25de38f1e0b4b5fa88c6688c31ffe23fb1
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Aug 12 17:40:23 2015 +0200

    Basic RSpec3 support
---
 debian/patches/rspec3.patch | 69 +++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |  1 +
 2 files changed, 70 insertions(+)

diff --git a/debian/patches/rspec3.patch b/debian/patches/rspec3.patch
new file mode 100644
index 0000000..22e6854
--- /dev/null
+++ b/debian/patches/rspec3.patch
@@ -0,0 +1,69 @@
+Description: Basic RSpec3 support
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2015-08-12
+Bug-Debian: https://bugs.debian.org/794274
+Bug: https://github.com/intridea/omniauth-github/issues/52
+
+--- a/spec/omniauth/strategies/github_spec.rb
++++ b/spec/omniauth/strategies/github_spec.rb
+@@ -1,9 +1,9 @@
+ require 'spec_helper'
+ 
+ describe OmniAuth::Strategies::GitHub do
+-  let(:access_token) { stub('AccessToken', :options => {}) }
+-  let(:parsed_response) { stub('ParsedResponse') }
+-  let(:response) { stub('Response', :parsed => parsed_response) }
++  let(:access_token) { double('AccessToken', :options => {}) }
++  let(:parsed_response) { double('ParsedResponse') }
++  let(:response) { double('Response', :parsed => parsed_response) }
+ 
+   let(:enterprise_site)          { 'https://some.other.site.com/api/v3' }
+   let(:enterprise_authorize_url) { 'https://some.other.site.com/login/oauth/authorize' }
+@@ -25,7 +25,7 @@
+   end
+ 
+   before(:each) do
+-    subject.stub!(:access_token).and_return(access_token)
++    subject.stub(:access_token).and_return(access_token)
+   end
+ 
+   context "client options" do
+@@ -85,12 +85,12 @@
+ 
+   context "#email" do
+     it "should return email from raw_info if available" do
+-      subject.stub!(:raw_info).and_return({'email' => 'you at example.com'})
++      subject.stub(:raw_info).and_return({'email' => 'you at example.com'})
+       subject.email.should eq('you at example.com')
+     end
+ 
+     it "should return nil if there is no raw_info and email access is not allowed" do
+-      subject.stub!(:raw_info).and_return({})
++      subject.stub(:raw_info).and_return({})
+       subject.email.should be_nil
+     end
+ 
+@@ -99,9 +99,9 @@
+         { 'email' => 'secondary at example.com', 'primary' => false },
+         { 'email' => 'primary at example.com',   'primary' => true }
+       ]
+-      subject.stub!(:raw_info).and_return({})
++      subject.stub(:raw_info).and_return({})
+       subject.options['scope'] = 'user'
+-      subject.stub!(:emails).and_return(emails)
++      subject.stub(:emails).and_return(emails)
+       subject.email.should eq('primary at example.com')
+     end
+ 
+@@ -110,9 +110,9 @@
+         { 'email' => 'first at example.com',   'primary' => false },
+         { 'email' => 'second at example.com',  'primary' => false }
+       ]
+-      subject.stub!(:raw_info).and_return({})
++      subject.stub(:raw_info).and_return({})
+       subject.options['scope'] = 'user'
+-      subject.stub!(:emails).and_return(emails)
++      subject.stub(:emails).and_return(emails)
+       subject.email.should eq('first at example.com')
+     end
+   end
diff --git a/debian/patches/series b/debian/patches/series
index 78fde4e..deeceb7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-simplecov.patch
+rspec3.patch

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



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