Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Grouped a couple of examples together.

  • Loading branch information...
commit 0d157691b0a0cc940a31057c50c5d9c90501f53e 1 parent e6dda26
Federico Ravasio authored January 08, 2012

Showing 1 changed file with 14 additions and 12 deletions. Show diff stats Hide diff stats

  1. 26  spec/querying_spec.rb
26  spec/querying_spec.rb
@@ -26,21 +26,23 @@
26 26
     Post.delete_all
27 27
   end
28 28
 
29  
-  it 'should return a criteria when calling its methods' do
30  
-    Post.all.should be_a(Tyrion::Criteria)
31  
-  end
  29
+  describe '.all' do
  30
+    it 'should return a criteria when calling its methods' do
  31
+      Post.all.should be_a(Tyrion::Criteria)
  32
+    end
32 33
 
33  
-  it 'should create a Criteria instance and passing the model\'s class name' do
34  
-    Post.all.klass.should == Post.send(:klass_name)
35  
-  end
  34
+    it 'should create a Criteria instance and passing the model\'s class name' do
  35
+      Post.all.klass.should == Post.send(:klass_name)
  36
+    end
36 37
 
37  
-  it 'should return an enumerable' do
38  
-    Post.all.class.ancestors.should include(Enumerable)
39  
-  end
  38
+    it 'should return an enumerable' do
  39
+      Post.all.class.ancestors.should include(Enumerable)
  40
+    end
40 41
 
41  
-  it 'should return an iterable collection of Tyrion::Documents' do
42  
-    Post.all.each do |doc|
43  
-      doc.should be_a(Tyrion::Document)
  42
+    it 'should return an iterable collection of Tyrion::Documents' do
  43
+      Post.all.each do |doc|
  44
+        doc.should be_a(Tyrion::Document)
  45
+      end
44 46
     end
45 47
   end
46 48
 

0 notes on commit 0d15769

Please sign in to comment.
Something went wrong with that request. Please try again.