ruby-moneta (0.6.0-4) split_shared_examples_for_specs.patch

Summary

 spec/shared.rb             |   36 ++++++++++++++++++------------------
 spec/shared_not_expired.rb |   17 +++++++++++++++++
 2 files changed, 35 insertions(+), 18 deletions(-)

    
download this patch

Patch contents

# -*- coding: utf-8 -*-
Author: Cédric Boutillier <cedric.boutillier@gmail.com>
Description: Move nested shared_examples_for into its own file
Forwarded: no
--- 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