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
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 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
# Model: | |
class User < ActiveRecord::Base | |
attr_readonly :email | |
end | |
# Controller: | |
user = User.new :email => '[email protected]' |
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 '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 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
$ 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' |
NewerOlder