GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: RR (Double Ruby) is a test double framework that features a rich selection of double techniques and a terse syntax.
Homepage: http://rubyforge.org/projects/double-ruby
Clone URL: git://github.com/btakita/rr.git
Replacing proc invocations to lambda invocations.


git-svn-id: svn+ssh://rubyforge.org/var/svn/pivotalrb/rr/trunk@1642 
af276e61-6b34-4dac-905b-574b5f35ef33
btakita (author)
Wed Jun 18 22:53:32 -0700 2008
commit  eb23eb42cad2a432d64abc6a171407db1347b036
tree    3616c6b3a946d6fd91fc8c183d21554606bec5b9
parent  f7159650c710c00e8e61a18a1bc1dc881715901b
...
79
80
81
82
 
83
84
85
...
91
92
93
94
 
95
96
97
...
79
80
81
 
82
83
84
85
...
91
92
93
 
94
95
96
97
0
@@ -79,7 +79,7 @@ ArticlesController#edit action:
0
   my_article = articles(:my_article)
0
   user.can_edit?(my_article).should == false
0
 
0
- proc do
0
+ lambda do
0
     post :edit, :id => my_article.id, :body => "Hello everybody"
0
   end.should raise_error(SecurityTrangressionError)
0
 </pre>
0
@@ -91,7 +91,7 @@ ArticlesController#edit action:
0
   my_article = articles(:my_article)
0
   mock.probe(user).can_edit? {false}
0
 
0
- proc do
0
+ lambda do
0
     post :edit, :id => my_article.id, :body => "Hello everybody"
0
   end.should raise_error(SecurityTrangressionError)
0
 </pre>
...
211
212
213
214
 
215
216
217
...
211
212
213
 
214
215
216
217
0
@@ -211,7 +211,7 @@ module RR
0
       instance_method_name = method_name
0
 
0
       @definition = DoubleDefinition.new
0
- class_handler = proc do |return_value|
0
+ class_handler = lambda do |return_value|
0
         double_injection = @space.double_injection(return_value, instance_method_name)
0
         Double.new(double_injection, @definition)
0
         return_value
...
145
146
147
148
 
149
150
151
...
187
188
189
190
 
191
192
193
...
145
146
147
 
148
149
150
151
...
187
188
189
 
190
191
192
193
0
@@ -145,7 +145,7 @@ module RR
0
 
0
           @object.foobar(:exact_match)
0
           @object.foobar(:exact_match)
0
- proc do
0
+ lambda do
0
             @object.foobar(:exact_match)
0
           end.should raise_error(Errors::TimesCalledError)
0
         end
0
@@ -187,7 +187,7 @@ module RR
0
 
0
           @object.foobar(:anything)
0
           @object.foobar(:anything)
0
- proc do
0
+ lambda do
0
             @object.foobar(:anything)
0
           end.should raise_error(Errors::TimesCalledError)
0
         end
...
367
368
369
370
371
372
373
 
 
 
 
374
375
376
...
367
368
369
 
 
 
 
370
371
372
373
374
375
376
0
@@ -367,10 +367,10 @@ module RR
0
           proc do
0
             @space.verify_ordered_double(second_double)
0
           end.should raise_error(
0
- Errors::DoubleOrderError,
0
- "foobar() called out of order in list\n" <<
0
- "- foobar()\n" <<
0
- "- foobar()"
0
+ Errors::DoubleOrderError,
0
+ "foobar() called out of order in list\n" <<
0
+ "- foobar()\n" <<
0
+ "- foobar()"
0
           )
0
         end
0
 

Comments

    No one has commented yet.