public
Rubygem
Description: RSpec extension library for Ruby on Rails
Homepage:
Clone URL: git://github.com/dchelimsky/rspec-rails.git
exclude :partial => array example when running against rails < 2.0
David Chelimsky (author)
Sun Aug 24 08:44:36 -0700 2008
commit  68226c616856554fd1d68af959fbdb94b0e46b78
tree    f6cbf25b68e5e2d993089257adb4787339ce05d5
parent  905614b5c0afdb411f4eb321c5857fd6e3a5c57d
...
149
150
151
152
153
154
155
156
157
 
 
 
 
 
 
 
158
159
160
161
 
 
 
 
162
163
164
...
149
150
151
 
 
 
 
 
 
152
153
154
155
156
157
158
159
 
 
 
160
161
162
163
164
165
166
0
@@ -149,16 +149,18 @@ describe "A view that includes a partial using :collection and :spacer_template"
0
 
0
 end
0
 
0
-describe "A view that includes a partial using an array as partial_path", :type => :view do
0
-  before(:each) do
0
-    renderable_object = Object.new
0
-    renderable_object.stub!(:name).and_return("Renderable Object")
0
-    assigns[:array] = [renderable_object]
0
-  end
0
+if Rails::VERSION::MAJOR >= 2
0
+  describe "A view that includes a partial using an array as partial_path", :type => :view do
0
+    before(:each) do
0
+      renderable_object = Object.new
0
+      renderable_object.stub!(:name).and_return("Renderable Object")
0
+      assigns[:array] = [renderable_object]
0
+    end
0
 
0
-  it "should render the array passed through to render_partial without modification" do
0
-    render "view_spec/template_with_partial_with_array" 
0
-    response.body.should match(/^Renderable Object$/)
0
+    it "should render the array passed through to render_partial without modification" do
0
+      render "view_spec/template_with_partial_with_array" 
0
+      response.body.should match(/^Renderable Object$/)
0
+    end
0
   end
0
 end
0
 

Comments