This file contains hidden or 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 File.dirname(__FILE__) + '/../test_helper' | |
class LoggedInControllerExtensionTest < ActiveSupport::TestCase | |
def setup | |
self.expects(:before_filter).with(:foo) | |
self.include LoggedInControllerExtension | |
end | |
def test |
This file contains hidden or 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 'cgi' | |
module LoggedInControllerExtension | |
def self.included(base) | |
base.extend Setup | |
base.setup_logged_in | |
end | |
module Setup | |
def setup_logged_in |
This file contains hidden or 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 'test_helper' | |
class PeopleIntegrationTest < ActionController::IntegrationTest | |
use_transactional_fixtures = false | |
context "context no records" do | |
setup do | |
Person.create!(:name => 'Mike Gaffney') | |
visit(people_path) | |
click_link("Create New") |
This file contains hidden or 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
Webrat.configure do |config| | |
config.mode = :rails | |
end |
This file contains hidden or 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
Factory.define(:rate_profile) do |rp| | |
rp.start_date(Date.today) | |
end | |
Factory.define(:rate) do |r| | |
r.value '120.00' | |
r.rate_profile { Factory :rate_profile } | |
end |
This file contains hidden or 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
def cascade_taskrefnos | |
child_tasks = Task.find_all_by_parentid(self.id) | |
child_tasks.each do |child_task| | |
child_task.update_attributes! :taskrefno => "#{taskrefno}.#{child_task.childseq}" | |
child_task.cascade_taskrefnos | |
end | |
end |
This file contains hidden or 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
# tokens/termials | |
EQ | |
LBRACE | |
RBRACE | |
LPAREN | |
RPAREN | |
DOT | |
COMMA | |
PIPE |
This file contains hidden or 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
#Other stuff, mostly comments | |
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so | |
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.1.3 | |
PassengerRuby /usr/bin/ruby1.8 | |
# Include the virtual host configurations: | |
Include /etc/apache2/sites-enabled/ | |
NameVirtualHost *:80 |
This file contains hidden or 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
ServerRoot "/etc/apache2" | |
LockFile /var/lock/apache2/accept.lock | |
PidFile ${APACHE_PID_FILE} | |
Timeout 300 | |
KeepAlive On |
This file contains hidden or 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
config.cache_classes = true | |
config.whiny_nils = true | |
config.action_controller.consider_all_requests_local = true | |
config.action_controller.perform_caching = false | |
config.action_view.cache_template_loading = true | |
config.action_controller.allow_forgery_protection = false |
OlderNewer