[DRE-commits] [ruby-extendmatrix] 04/07: Fix RSpec usage
Balint Reczey
rbalint at moszumanska.debian.org
Fri May 22 15:28:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
rbalint pushed a commit to branch master
in repository ruby-extendmatrix.
commit d086e94bc44deb431b10005d7ec11f83c46674ba
Author: Balint Reczey <balint at balintreczey.hu>
Date: Fri May 22 16:34:21 2015 +0200
Fix RSpec usage
---
debian/patches/0001-Updated-to-rspec-2.patch | 51 ++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 52 insertions(+)
diff --git a/debian/patches/0001-Updated-to-rspec-2.patch b/debian/patches/0001-Updated-to-rspec-2.patch
new file mode 100644
index 0000000..ad3af0d
--- /dev/null
+++ b/debian/patches/0001-Updated-to-rspec-2.patch
@@ -0,0 +1,51 @@
+From d8b895a3e459fabf43aed6d778195f4f05832465 Mon Sep 17 00:00:00 2001
+From: Claudio Bustos <clbustos at gmail.com>
+Date: Fri, 12 Nov 2010 23:53:22 -0300
+Subject: [PATCH] Updated to rspec-2
+
+--- a/Rakefile
++++ b/Rakefile
+@@ -2,9 +2,22 @@
+ $:.unshift(File.dirname(__FILE__)+"/lib")
+ require 'rubygems'
+ require 'hoe'
+-require 'extendmatrix.rb'
++require 'extendmatrix'
++
++require 'rspec'
++require 'rspec/core/rake_task'
++
++RSpec::Core::RakeTask.new do |t|
++ t.rspec_opts = ["-c", "-f progress"]
++ t.pattern = 'spec/**/*_spec.rb'
++end
++
++
++
+ Hoe.plugin :git
+ Hoe.spec 'extendmatrix' do
++ self.testlib=:rspec
++ self.test_globs="spec/*_spec.rb"
+ self.rubyforge_name = 'ruby-statsample'
+ self.version = Matrix::EXTENSION_VERSION
+ self.developer('Cosmin Bonchis', 'cbonchis_info.uvt.ro')
+--- a/spec/extendmatrix_spec.rb
++++ b/spec/extendmatrix_spec.rb
+@@ -1,6 +1,6 @@
+ $:.unshift(File.dirname(__FILE__)+"/../lib")
+-require 'spec'
+-require 'spec/autorun'
++require 'rspec'
++require 'rspec/core/rake_task'
+
+ require 'extendmatrix'
+
+@@ -287,7 +287,7 @@
+ eigenvalues=[1.92,1.88,0.0,0.0]
+ eigen=m.eigen
+ eigen[:eigenvalues].each_with_index do |v,i|
+- v.should be_close(eigenvalues[i],0.01)
++ v.should be_within(0.01).of(eigenvalues[i])
+ end
+ eigenvectors=Matrix[[0.5, 0.5, 0.0, 0.707106781186547], [0.5, 0.5, 0.0, -0.707106781186547], [0.5, -0.5, 0.707106781186547, 0.0], [0.5, -0.5, -0.707106781186547, 0.0]]
+ Matrix.equal_in_delta?(eigen[:eigenvectors], eigenvectors).should be_true
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..562cc03
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Updated-to-rspec-2.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-extendmatrix.git
More information about the Pkg-ruby-extras-commits
mailing list