[DRE-commits] [SCM] ruby-moneta.git branch, master, updated. debian/0.6.0-2-5-ga7fe141
Cédric Boutillier
cedric.boutillier at gmail.com
Tue May 1 22:15:30 UTC 2012
The following commit has been merged in the master branch:
commit 448430a32b0ca1424e69bd44cb705af50dcd5a6f
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date: Tue May 1 23:58:24 2012 +0200
patches: move shared_examples outside another shared_examples group
diff --git a/debian/patches/modify_spec_helper.patch b/debian/patches/modify_spec_helper.patch
new file mode 100644
index 0000000..9af8a27
--- /dev/null
+++ b/debian/patches/modify_spec_helper.patch
@@ -0,0 +1,16 @@
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,7 +1,10 @@
+ $TESTING=true
+-$:.push File.join(File.dirname(__FILE__), '..', 'lib')
++#$:.push File.join(File.dirname(__FILE__), '..', 'lib')
+
+-require "rubygems"
++#require "rubygems"
+ require "moneta"
+
+-require File.expand_path(File.join(File.dirname(__FILE__), "shared"))
++require "shared"
++require "shared_not_expired"
++
++#require File.expand_path(File.join(File.dirname(__FILE__), "shared"))
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4f7d1a6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+split_shared_examples_for_specs.patch
+modify_spec_helper.patch
diff --git a/debian/patches/split_shared_examples_for_specs.patch b/debian/patches/split_shared_examples_for_specs.patch
new file mode 100644
index 0000000..76926f1
--- /dev/null
+++ b/debian/patches/split_shared_examples_for_specs.patch
@@ -0,0 +1,70 @@
+--- a/spec/shared.rb
++++ b/spec/shared.rb
+@@ -62,23 +62,23 @@
+ @cache.store("key", "value", :expires_in => 1)
+ end
+
+- shared_examples_for "not expired" do
+- it "still has the key" do
+- @cache.key?("key").should be_true
+- end
+-
+- it "returns the value when indexed" do
+- @cache["key"].should == "value"
+- end
+-
+- it "returns the value when fetched" do
+- @cache.fetch("key", "value2").should == "value"
+- end
+-
+- it "returns the value when deleted" do
+- @cache.delete("key").should == "value"
+- end
+- end
++# shared_examples_for "not expired" do
++# it "still has the key" do
++# @cache.key?("key").should be_true
++# end
++#
++# it "returns the value when indexed" do
++# @cache["key"].should == "value"
++# end
++#
++# it "returns the value when fetched" do
++# @cache.fetch("key", "value2").should == "value"
++# end
++#
++# it "returns the value when deleted" do
++# @cache.delete("key").should == "value"
++# end
++# end
+
+ describe "when expired" do
+ before(:each) do
+@@ -119,4 +119,4 @@
+ it_should_behave_like "not expired"
+ end
+ end
+-end
+\ No newline at end of file
++end
+--- /dev/null
++++ b/spec/shared_not_expired.rb
+@@ -0,0 +1,17 @@
++shared_examples_for "not expired" do
++ it "still has the key" do
++ @cache.key?("key").should be_true
++ end
++
++ it "returns the value when indexed" do
++ @cache["key"].should == "value"
++ end
++
++ it "returns the value when fetched" do
++ @cache.fetch("key", "value2").should == "value"
++ end
++
++ it "returns the value when deleted" do
++ @cache.delete("key").should == "value"
++ end
++end
--
ruby-moneta.git
More information about the Pkg-ruby-extras-commits
mailing list