[DRE-commits] [ruby-jsonify] 01/01: Add patch for rspec tests to run using rspec3

Tim Potter tpot-guest at moszumanska.debian.org
Tue Aug 11 06:20:31 UTC 2015


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

tpot-guest pushed a commit to branch master
in repository ruby-jsonify.

commit 228a958ca8dc6e35cbad713ea9ce5929e5a19c63
Author: Tim Potter <tpot at hp.com>
Date:   Tue Aug 11 16:19:28 2015 +1000

    Add patch for rspec tests to run using rspec3
---
 debian/changelog            |  6 ++++++
 debian/patches/rspec3.patch | 41 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |  1 +
 3 files changed, 48 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 798b752..e3fbf30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-jsonify (0.4.1-3) unstable; urgency=medium
+
+  * Add patch for rspec tests to run using rspec3
+
+ -- Tim Potter <tpot at hp.com>  Tue, 11 Aug 2015 16:18:47 +1000
+
 ruby-jsonify (0.4.1-2) unstable; urgency=medium
 
   * Better DEP-3 header for the patch
diff --git a/debian/patches/rspec3.patch b/debian/patches/rspec3.patch
new file mode 100644
index 0000000..95966a0
--- /dev/null
+++ b/debian/patches/rspec3.patch
@@ -0,0 +1,41 @@
+Description: Update rspec tests for changes introduced in rspec3
+ Rspec3 deprecates and removes some previously valid syntax in rspec2.  This patch
+ updates the tests to work with Rspec3, which is the default now in Debian.
+Author: Tim Potter <tpot at hp.com>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: ruby-jsonify/spec/spec_helper.rb
+===================================================================
+--- ruby-jsonify.orig/spec/spec_helper.rb
++++ ruby-jsonify/spec/spec_helper.rb
+@@ -6,4 +6,5 @@ require 'jsonify'
+ require 'jsonify/tilt'
+ 
+ RSpec.configure do |config|
++  config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
+ end
+Index: ruby-jsonify/spec/jsonify_spec.rb
+===================================================================
+--- ruby-jsonify.orig/spec/jsonify_spec.rb
++++ ruby-jsonify/spec/jsonify_spec.rb
+@@ -1,4 +1,4 @@
+ require 'spec_helper'
+ describe Jsonify do
+-  it('should be true') {true.should be_true}
+-end
+\ No newline at end of file
++  it('should be true') {expect(true).to be true}
++end
+Index: ruby-jsonify/spec/builder_spec.rb
+===================================================================
+--- ruby-jsonify.orig/spec/builder_spec.rb
++++ ruby-jsonify/spec/builder_spec.rb
+@@ -148,7 +148,7 @@ PRETTY_JSON
+ 
+   describe "attributes!" do
+     it "should allow create object with attributes of another object" do
+-      object = stub(:id => 1, :name => 'foo')
++      object = double(:id => 1, :name => 'foo')
+       json.attributes!(object, :id, :name)
+       MultiJson.load(json.compile!).should == {'id' => 1, 'name' => 'foo'}
+     end
diff --git a/debian/patches/series b/debian/patches/series
index ab81aef..b0acfdd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 disable-bundler-requires.patch
+rspec3.patch

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



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