Finished in 37.42 seconds
306 examples, 0 failures, 2 pending
rspec 22.39s user 16.56s system 102% cpu 37.925 total
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
>> global_variables | |
=> [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, | |
:$\, :$_, :$stdin, :$stdout, :$stderr, :$>, :$<, :$., :$FILENAME, :$-i, :$*, :$?, :$$, :$:, | |
:$-I, :$LOAD_PATH, :$", :$LOADED_FEATURES, :$VERBOSE, :$-v, :$-w, :$-W, :$DEBUG, :$-d, :$0, | |
:$PROGRAM_NAME, :$-p, :$-l, :$-a, :$binding, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9] | |
>> require 'english' | |
=> true | |
>> global_variables |
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 'logger' | |
$logger = Logger.new(STDOUT) | |
require 'active_support/cache' | |
$cache = ActiveSupport::Cache.lookup_store(:memory_store) | |
$cache.logger = $logger | |
$cache.clear | |
class EtagMiddleware |
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
if defined?(ActiveRecord::ConnectionAdapters::SQLServerAdapter) | |
ActiveRecord::ConnectionAdapters::SQLServerAdapter.enable_default_unicode_types = true | |
ActiveRecord::ConnectionAdapters::SQLServerAdapter.native_text_database_type = 'ntext' | |
ActiveRecord::ConnectionAdapters::SQLServerAdapter.native_string_database_type = 'nvarchar' | |
end | |
version = ActiveRecord::ConnectionAdapters::Sqlserver::Version::VERSION | |
preferred_version = '3.2.1' | |
if version == preferred_version |
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
# spec/support/soap_client.rb | |
class SoapClient | |
def self.call(env) | |
new(env).response | |
end | |
def initialize(env) | |
@env = env | |
@request = Rack::Request.new(env) |
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 some_method(param) | |
foo = nil | |
if param | |
if param == "value" | |
foo = get_foo_somehow | |
else | |
foo = get_foo_some_other_way | |
end | |
unless foo | |
foo = find_foo |
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
class Users::Register | |
def self.call(attributes) | |
new(attributes).call | |
end | |
def initialize(attributes) | |
@attributes = attributes | |
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
# Start tracking how much time you lose by loading Rails constantly | |
# by adding a couple of lines to config/environment.rb | |
# The first one is on top, the rest at the bottom of the file... | |
start_time = Time.now | |
# Load the rails application | |
require File.expand_path('../application', __FILE__) | |
# Initialize the rails application | |
YOUR_APPLICATION_NAME::Application.initialize! |
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
occurrence = stub | |
def occurrence.update_attributes(attrs) | |
attrs.each do |key, value| | |
stub(key).and_return(value) | |
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
syntax on | |
filetype plugin indent on | |
" Don't redraw during macro execution | |
set lazyredraw | |
" tir_black looks most like ir_black in console | |
colorscheme tir_black | |
" Syntax coloring lines that are too long just slows down the world |