This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Daemon | |
def initialize(run_now = true) | |
run if run_now | |
end | |
def run | |
raise "dont call me" | |
# loop do | |
# puts "running!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'ramaze' | |
require 'rack/test' | |
require 'spec' | |
require 'spec/autorun' | |
require 'rr' | |
Spec::Runner.configure do |config| | |
config.mock_with :rr | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in /home/btakita/workspace/ramaze) | |
1/90: spec/contrib/rest.rb [32m 5 passed[0m | |
2/90: spec/examples/templates/template_remarkably.rb [32m 3 passed[0m | |
3/90: spec/examples/templates/template_liquid.rb [32m 3 passed[0m | |
4/90: spec/examples/templates/template_markaby.rb [33m needed Ramaze::View::Markaby[0m | |
5/90: spec/examples/templates/template_redcloth.rb [32m 3 passed[0m | |
6/90: spec/examples/templates/template_haml.rb [32m 3 passed[0m | |
7/90: spec/examples/templates/template_nagoro.rb [32m 3 passed[0m | |
8/90: spec/examples/templates/template_tenjin.rb [32m 3 passed[0m | |
9/90: spec/examples/templates/template_erubis.rb [32m 3 passed[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < Sinatra::Base | |
map "/users" | |
get "/" do | |
end | |
post "/" do | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
series "has three steps" do | |
step "one" do | |
end | |
step "two" do | |
end | |
step "three" do | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |