Skip to content
This repository
Browse code

Add {{{ }}} around test blocks

  • Loading branch information...
commit 2a6db5413a4276183801b727d9646653c6c2083f 1 parent c3f74be
Blake Thomson authored August 22, 2012 remiprev committed August 27, 2012

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

  1. 54  spec/model/orm_spec.rb
54  spec/model/orm_spec.rb
@@ -316,7 +316,7 @@ def organization=(organization)
316 316
   end
317 317
 
318 318
   context "saving resources with overridden to_params" do
319  
-    before do
  319
+    before do # {{{
320 320
       Her::API.setup :url => "https://api.example.com" do |builder|
321 321
         builder.use Her::Middleware::FirstLevelParseJSON
322 322
         builder.use Faraday::Request::UrlEncoded
@@ -329,29 +329,29 @@ def organization=(organization)
329 329
             [200, {}, body]
330 330
           end
331 331
         end
332  
-      end
  332
+      end # }}}
333 333
 
334 334
       spawn_model "Foo::User" do
335 335
         def to_params
336 336
           { :fullname => "Lindsay Fünke" }
337 337
         end
338 338
       end
339  
-    end
  339
+    end # }}}
340 340
 
341  
-    it "changes the request parameters for one-line resource creation" do
  341
+    it "changes the request parameters for one-line resource creation" do # {{{
342 342
       @user = Foo::User.create(:fullname => "Tobias Fünke")
343 343
       @user.fullname.should == "Lindsay Fünke"
344  
-    end
  344
+    end # }}}
345 345
 
346  
-    it "changes the request parameters for Model.new + #save" do
  346
+    it "changes the request parameters for Model.new + #save" do # {{{
347 347
       @user = Foo::User.new(:fullname => "Tobias Fünke")
348 348
       @user.save
349 349
       @user.fullname.should == "Lindsay Fünke"
350  
-    end
  350
+    end # }}}
351 351
   end
352 352
 
353 353
   context "checking resource equality" do
354  
-    before do
  354
+    before do # {{{
355 355
       Her::API.setup :url => "https://api.example.com" do |builder|
356 356
         builder.use Her::Middleware::FirstLevelParseJSON
357 357
         builder.use Faraday::Request::UrlEncoded
@@ -364,52 +364,52 @@ def to_params
364 364
 
365 365
       spawn_model "Foo::User"
366 366
       spawn_model "Foo::Admin"
367  
-    end
  367
+    end # }}}
368 368
 
369 369
     let(:user) { Foo::User.find(1) }
370 370
 
371  
-    it "returns true for the exact same object" do
  371
+    it "returns true for the exact same object" do # {{{
372 372
       user.should == user
373  
-    end
  373
+    end # }}}
374 374
 
375  
-    it "returns true for the same resource via find" do
  375
+    it "returns true for the same resource via find" do # {{{
376 376
       user.should == Foo::User.find(1)
377  
-    end
  377
+    end # }}}
378 378
 
379  
-    it "returns true for the same class with identical data" do
  379
+    it "returns true for the same class with identical data" do # {{{
380 380
       user.should == Foo::User.new(:id => 1, :fullname => "Lindsay Fünke")
381  
-    end
  381
+    end # }}}
382 382
 
383  
-    it "returns true for a different resource with the same data" do
  383
+    it "returns true for a different resource with the same data" do # {{{
384 384
       user.should == Foo::Admin.find(1)
385  
-    end
  385
+    end # }}}
386 386
 
387  
-    it "returns false for the same class with different data" do
  387
+    it "returns false for the same class with different data" do # {{{
388 388
       user.should_not == Foo::User.new(:id => 2, :fullname => "Tobias Fünke")
389  
-    end
  389
+    end # }}}
390 390
 
391  
-    it "returns false for a non-resource with the same data" do
  391
+    it "returns false for a non-resource with the same data" do # {{{
392 392
       fake_user = stub(:data => { :id => 1, :fullname => "Lindsay Fünke" })
393 393
       user.should_not == fake_user
394  
-    end
  394
+    end # }}}
395 395
 
396  
-    it "delegates eql? to ==" do
  396
+    it "delegates eql? to ==" do # {{{
397 397
       other = Object.new
398 398
       user.expects(:==).with(other).returns(true)
399 399
       user.eql?(other).should be_true
400  
-    end
  400
+    end # }}}
401 401
 
402  
-    it "treats equal resources as equal for Array#uniq" do
  402
+    it "treats equal resources as equal for Array#uniq" do # {{{
403 403
       user2 = Foo::User.find(1)
404 404
       [user, user2].uniq.should == [user]
405  
-    end
  405
+    end # }}}
406 406
 
407  
-    it "treats equal resources as equal for hash keys" do
  407
+    it "treats equal resources as equal for hash keys" do # {{{
408 408
       Foo::User.find(1)
409 409
       hash = { user => true }
410 410
       hash[Foo::User.find(1)] = false
411 411
       hash.size.should == 1
412 412
       hash.should == { user => false }
413  
-    end
  413
+    end # }}}
414 414
   end
415 415
 end

0 notes on commit 2a6db54

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