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
$ rspec spec/models/user_spec.rb:118 --drb -d -b | |
Run filtered including {:line_number=>118} | |
F | |
Failures: | |
1) User validation for password should not require password confirmation | |
Failure/Error: should allow_value('something').for :password | |
Did not expect errors when password is set to "something", got error: | |
# /home/zequez/.rvm/gems/ruby-1.9.2-p290/gems/rspec-expectations-2.6.0/lib/rspec/expectations/fail_with.rb:29:in `fail_with' |
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 'spec_helper' | |
describe User do | |
subject { @user } | |
before(:each) { @user = User.new } | |
context "when creating .new User" do | |
before(:each) { @user = User.new } |
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
# Model: | |
class User < ActiveRecord::Base | |
attr_readonly :email | |
end | |
# Controller: | |
user = User.new :email => '[email protected]' |
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
activerecord (3.1.0.rc8) lib/active_record/associations/association.rb:205:in `raise_on_type_mismatch' | |
activerecord (3.1.0.rc8) lib/active_record/associations/belongs_to_association.rb:6:in `replace' | |
activerecord (3.1.0.rc8) lib/active_record/associations/singular_association.rb:17:in `writer' | |
activerecord (3.1.0.rc8) lib/active_record/associations/builder/association.rb:49:in `block in define_writers' | |
activerecord (3.1.0.rc8) lib/active_record/base.rb:1745:in `block in assign_attributes' | |
activerecord (3.1.0.rc8) lib/active_record/base.rb:1741:in `each' | |
activerecord (3.1.0.rc8) lib/active_record/base.rb:1741:in `assign_attributes' | |
activerecord (3.1.0.rc8) lib/active_record/associations/association.rb:237:in `block in build_record' | |
activerecord (3.1.0.rc8) lib/active_record/base.rb:1563:in `initialize' | |
activerecord (3.1.0.rc8) lib/active_record/reflection.rb:190:in `new' |
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 ActiveRecord::NestedAttributes | |
module ClassMethods | |
def accepts_nested_attributes_for(*attr_names) | |
options = { :allow_destroy => false, :update_only => false } | |
options.update(attr_names.extract_options!) | |
# Modified stuff | |
#options.assert_valid_keys(:allow_destroy, :reject_if, :limit, :update_only) | |
options.assert_valid_keys(:allow_destroy, :reject_if, :limit, :update_only, :allow_existing) |
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
/* Font size in PT test. */ | |
body { | |
font-family: Verdana; | |
} | |
.pt, .in, .px { | |
float: left; | |
margin-right: 1px; | |
width: 60px; |
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
; If someone wants to make a file watcher, you're very welcome to do so. | |
; This works pressing Alt+Shift+R | |
#SingleInstance force | |
SetTitleMatchMode RegEx | |
; You need to have the Extensions tab open in a separated window | |
; And then another window or tab with the page where you're testing your extension | |
; Change this to your testing page title | |
redirectWindowAfterReload = Title of your testing page - Google Chrome$ |
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 'webrick' | |
require 'yaml' | |
port = 2332 | |
cassettes_dir = './spec/fixtures/vcr_cassettes/' | |
replace_relative_url = true | |
files = Dir["#{cassettes_dir}**/**"] | |
pages = {} |
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
# If you worked with React and JSX you probably noticed that you can't use JS comments when inside JSX sections | |
# Add this to your Atom init script | |
# Then add 'ctrl-cmd-/': 'comment-jsx' to your keymap.cson | |
# Then when you are on a JS/JSX file, just press cmd+ctrl+/ to use JSX-style comments that work with JSX elements | |
# Is not the most efficient way, but it's the cleanest and reliable one | |
atom.commands.add 'atom-workspace', 'comment-jsx', -> | |
atom.config.set('editor.commentStart', '{/*', {scopeSelector: '.source.js.jsx'}) | |
atom.config.set('editor.commentEnd', '*/}', {scopeSelector: '.source.js.jsx'}) | |
for selection in atom.workspace.getActiveTextEditor().selections |
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
javascript:!function(){___rotate=window.___rotate||0,___rotate++,___rotate>3&&(___rotate=0);var t=document.documentElement,o=t.clientWidth,e=t.clientHeight,r=document.body,i=r.style;0===___rotate?(i.transform="",i.position="",i.width="",i.height="",i.left="",i.top=""):1===___rotate?(i.transform="rotate(90deg)",i.transformOrigin="top left",i.position="absolute",i.width=e+"px",i.height=o+"px",i.left="100%",i.top="0"):2===___rotate?(i.transform="rotate(180deg)",i.transformOrigin="top left",i.position="absolute",i.width=o+"px",i.height=e+"px",i.left="100%",i.top="100%"):3===___rotate&&(i.transform="rotate(270deg)",i.transformOrigin="top left",i.position="absolute",i.width=e+"px",i.height=o+"px",i.left="0",i.top="100%")}(); |
OlderNewer