CustomSourceCodeSelectionTests.st
changeset 802 d18856b2e288
parent 777 8f212cf1bb45
child 803 95cdac772759
--- a/CustomSourceCodeSelectionTests.st	Sat Jan 24 20:10:46 2015 +0100
+++ b/CustomSourceCodeSelectionTests.st	Sat Jan 24 20:49:49 2015 +0100
@@ -97,18 +97,20 @@
 !
 
 test_print_on_all_filled
-    | expectedString actualString stream |
+    | expectedString actualString stream method |
+
+    method := (self class compiledMethodAt: #test_print_on_all_filled).
 
     expectedString := 'a CustomSourceCodeSelection (selectedInterval: 2 to:5; ',
         'currentSourceCode: test_print_on_all_filled ^ 265; ',
-        'selectedMethod: a Method(CustomSourceCodeSelectionTests test_print_on_all_filled); ',
+        'selectedMethod: ', method asString, '; ',
         'selectedClass: CustomSourceCodeSelectionTests; selectedSelector: test_print_on_all_filled)'.
 
     stream := WriteStream on:(String new).
 
     codeSelection
         selectedClass: self class;
-        selectedMethod: (self class compiledMethodAt: #test_print_on_all_filled);
+        selectedMethod: method;
         selectedInterval: (2 to: 5);
         selectedSelector: #test_print_on_all_filled;
         currentSourceCode: 'test_print_on_all_filled ^ 265';
@@ -120,7 +122,7 @@
     
     self assert: expectedString = actualString.
 
-    "Modified: / 28-10-2014 / 10:27:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 24-01-2015 / 20:47:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 test_selected_selector_from_method