Skip to content

Instantly share code, notes, and snippets.

module ActionController::Integration::Runner
# TODO: Make this a rails patch
def method_missing(sym, *args, &block)
reset! unless @integration_session
if @integration_session.respond_to?(sym)
returning @integration_session.__send__(sym, *args, &block) do
copy_session_variables!
end
else
super
class SiteWidget < Erector::Widget
class << self
def tag(name, value=nil, &implentation)
raise(ArgumentError, "You cannot have both a value and an implentation") if value && implentation
if implentation
define_method(name, &implentation)
else
define_method(name) {value}
end
end
require "rubygems"
require "spec"
require "spec/autorun"
require "spec/interop/test"
require "activesupport"
require "shoulda"
describe "Something" do
def test_something
puts "in test_something"
class Daemon
def initialize(run_now = true)
run if run_now
end
def run
raise "dont call me"
# loop do
# puts "running!"
#!/bin/sh
# do something like this to run jsunit tests on osx (safari)
# cd ~/.cruise/projects/Sandbox/work
# svn up
# rake jsunit:start_servant
#Don't need this until we want to test IE
#open ~/Documents/Parallels/winxp.pvm
require 'rubygems'
require 'ramaze'
require 'rack/test'
require 'spec'
require 'spec/autorun'
require 'rr'
Spec::Runner.configure do |config|
config.mock_with :rr
end
(in /home/btakita/workspace/ramaze)
1/90: spec/contrib/rest.rb  5 passed
2/90: spec/examples/templates/template_remarkably.rb  3 passed
3/90: spec/examples/templates/template_liquid.rb  3 passed
4/90: spec/examples/templates/template_markaby.rb  needed Ramaze::View::Markaby
5/90: spec/examples/templates/template_redcloth.rb  3 passed
6/90: spec/examples/templates/template_haml.rb  3 passed
7/90: spec/examples/templates/template_nagoro.rb  3 passed
8/90: spec/examples/templates/template_tenjin.rb  3 passed
9/90: spec/examples/templates/template_erubis.rb  3 passed
class User < Sinatra::Base
map "/users"
get "/" do
end
post "/" do
end
series "has three steps" do
step "one" do
end
step "two" do
end
step "three" do
end
module ActionView #:nodoc:
module TemplateHandlers #:nodoc:
class ErectorTemplate < TemplateHandler
include Compilable
def self.line_offset
2
end
ActionView::Template.instance_eval do
register_template_handler :ert, ActionView::TemplateHandlers::ErectorTemplate