[DRE-commits] [SCM] ruby-minimization.git branch, master, updated. upstream/0.2.1-10-g14af192

Cédric Boutillier boutil at debian.org
Tue Dec 11 15:38:06 UTC 2012


The following commit has been merged in the master branch:
commit 0078ec0322f75bbca5c702968a6fc1f905327634
Author: Cédric Boutillier <boutil at debian.org>
Date:   Tue Dec 11 15:04:16 2012 +0100

    add adapt_specs_to_rspec2.patch

diff --git a/debian/patches/adapt_specs_to_rspec2.patch b/debian/patches/adapt_specs_to_rspec2.patch
new file mode 100644
index 0000000..756ddbc
--- /dev/null
+++ b/debian/patches/adapt_specs_to_rspec2.patch
@@ -0,0 +1,63 @@
+Description: Adapt specs to RSpec2
+ Do require 'spec', the deprecated version of RSpec.
+ Change be_close to be_within to avoid warnings
+Author: Cédric Boutillier <boutil at debian.org>
+Bug: https://github.com/clbustos/minimization/pull/1
+Last-Update: 2012-12-10
+
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,12 +1,6 @@
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+ require 'minimization.rb'
+-require 'spec'
+-require 'spec/autorun'
+-
+-Spec::Runner.configure do |config|
+-  
+-end
+ 
+ class String
+   def deindent
+--- a/spec/minimization_unidimensional_spec.rb
++++ b/spec/minimization_unidimensional_spec.rb
+@@ -14,10 +14,10 @@
+       @min.iterate
+     end
+     it "#x_minimum be close to expected" do 
+-      @min.x_minimum.should be_close(@p1, at min.epsilon)
++      @min.x_minimum.should be_within(@min.epsilon).of(@p1)
+     end
+     it "#f_minimum ( f(x)) be close to expected" do 
+-      @min.f_minimum.should be_close(@p2, at min.epsilon)
++      @min.f_minimum.should be_within(@min.epsilon).of(@p2)
+     end
+     context "#log" do
+       subject {@min.log}
+@@ -32,10 +32,10 @@
+       @min = Minimization::GoldenSection.minimize(-1000,1000, &@func)
+     end
+     it "#x_minimum be close to expected" do 
+-      @min.x_minimum.should be_close(@p1, at min.epsilon)
++      @min.x_minimum.should be_within(@min.epsilon).of(@p1)
+     end
+     it "#f_minimum ( f(x)) be close to expected" do 
+-      @min.f_minimum.should be_close(@p2, at min.epsilon)
++      @min.f_minimum.should be_within(@min.epsilon).of(@p2)
+     end
+     context "#log" do
+       subject {@min.log}
+@@ -48,10 +48,10 @@
+       @min = Minimization::Brent.minimize(-1000,1000, &@func)
+     end
+     it "should x be correct" do 
+-      @min.x_minimum.should be_close(@p1, at min.epsilon)
++      @min.x_minimum.should be_within(@min.epsilon).of(@p1)
+     end
+     it "should f(x) be correct" do 
+-      @min.f_minimum.should be_close(@p2, at min.epsilon)
++      @min.f_minimum.should be_within(@min.epsilon).of(@p2)
+     end
+     context "#log" do
+       subject {@min.log}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..90ca404
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+adapt_specs_to_rspec2.patch

-- 
ruby-minimization.git



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