diff options
author | murphy <murphy@rubychan.de> | 2006-10-15 15:10:04 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-10-15 15:10:04 +0000 |
commit | f5768c09019b303e82b7b7905b137b0e1df3823c (patch) | |
tree | a0bca63a318f848c6932070b4779226520fa040c /test/scanners/ruby/diffed.in.rb | |
parent | dd1f6c2ed2fa76d8862233494519d797e9ffb488 (diff) | |
download | coderay-f5768c09019b303e82b7b7905b137b0e1df3823c.tar.gz |
Moved scanner tests into test/scanners.
Diffstat (limited to 'test/scanners/ruby/diffed.in.rb')
-rw-r--r-- | test/scanners/ruby/diffed.in.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/scanners/ruby/diffed.in.rb b/test/scanners/ruby/diffed.in.rb new file mode 100644 index 0000000..a1deb0f --- /dev/null +++ b/test/scanners/ruby/diffed.in.rb @@ -0,0 +1,30 @@ +## example diff [diff]
+Index: /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb
+===================================================================
+--- /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1431)
++++ /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1437)
+@@ -1,6 +1,10 @@
++require 'login_system'
+ require 'coderay'
+
+ class PastesController < ApplicationController
++ include LoginSystem
++
++ before_filter :attempt_cookie_login
+
+ # caches_action :recent
+
+@@ -10,11 +14,7 @@
+
+ def show
+ @paste = Paste.find(params[:id])
+- if params[:key] and params[:key]==User.new(@paste.nick).magic_mojo
+- session[:login]=@paste.nick
+- return redirect_to(:action => 'show', :id => @paste.id)
+- end
+-
++ attempt_key_login if not logged_in?
+ unless @paste.asset or not @paste.body.blank?
+ render :action => "edit"
+ end
+
|