Skip to content

Instantly share code, notes, and snippets.

@dgoldie
Created January 24, 2014 00:19
Show Gist options
  • Save dgoldie/8589641 to your computer and use it in GitHub Desktop.
Save dgoldie/8589641 to your computer and use it in GitHub Desktop.
2.0.0@galactica apollo:~/code/2013/apps/boatbound/galactica (develop)!!!
$ bin/rspec spec/controllers/users/registrations_controller_spec.rb:104
You are using WebMock 1.16.1. VCR 2.8.0 has been tested against WebMock >= 1.8.0, < 1.16, and you are using a newer version. If you experience VCR issues, consider downgrading WebMock as it may fix it.
Run options: include {:locations=>{"./spec/controllers/users/registrations_controller_spec.rb"=>[104]}}
Users::RegistrationsController
POST create
init: #<User id: nil, deleted_at: nil, public_id: nil, referral_code: nil, invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: nil, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: nil, confirmed_at: nil, confirmation_sent_at: nil, unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: nil, updated_at: nil>, notification_preferences
record = #<User id: nil, deleted_at: nil, public_id: nil, referral_code: nil, invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: nil, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: nil, confirmed_at: nil, confirmation_sent_at: nil, unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: nil, updated_at: nil>, attribute: notification_preferences
bitmasks = {:read_lifesavers=>{"message_owner"=>1, "special_offers"=>2, "pre_approvals"=>4}, :notification_preferences=>{"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}}
mapping: {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
1. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
2. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
stored = 0
extract values = []
3.. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
val= mapping: {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
val: self: [:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email]
-----begin--
init: #<User id: nil, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">, notification_preferences
record = #<User id: nil, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">, attribute: notification_preferences
bitmasks = {:read_lifesavers=>{"message_owner"=>1, "special_offers"=>2, "pre_approvals"=>4}, :notification_preferences=>{"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}}
mapping: {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
1. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
2. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
stored = 63
extract values = [:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email]
3.. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
changes: {"email"=>["", "[email protected]"], "encrypted_password"=>["", "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye67Zeg6g2lS"], "notification_preferences"=>[nil, [:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email]], "public_id"=>[nil, "tnrev"], "referral_code"=>[nil, "tvsxj"], "created_at"=>[nil, Thu, 23 Jan 2014 15:44:02 PST -08:00], "updated_at"=>[nil, Thu, 23 Jan 2014 15:44:02 PST -08:00], "confirmation_token"=>[nil, "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b122e4a866f078d"], "confirmation_sent_at"=>[nil, Thu, 23 Jan 2014 15:44:02 PST -08:00]}
-----end----
***audit self = #<User id: 1, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">
***audited hash = {:email=>"[email protected]", :encrypted_password=>"$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye67Zeg6g2lS", :notification_preferences=>[:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email], :public_id=>"tnrev", :referral_code=>"tvsxj", :confirmation_token=>"47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b122e4a866f078d", :confirmation_sent_at=>Thu, 23 Jan 2014 15:44:02 PST -08:00, :id=>1}
***callbacks: []
***write audit: {:action=>"create", :audited_changes=>{:email=>"[email protected]", :encrypted_password=>"$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye67Zeg6g2lS", :notification_preferences=>[:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email], :public_id=>"tnrev", :referral_code=>"tvsxj", :confirmation_token=>"47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b122e4a866f078d", :confirmation_sent_at=>Thu, 23 Jan 2014 15:44:02 PST -08:00, :id=>1}, :comment=>nil}
***write audit self: #<User id: 1, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">
init: #<User id: 1, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e18da38,'0.1E1',9(45)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">, notification_preferences
record = #<User id: 1, deleted_at: nil, public_id: "tnrev", referral_code: "tvsxj", invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: 63, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e18da38,'0.1E1',9(45)>, first_message_avg_response_time: 0, birthdate: nil, us_ssn: nil, us_ein: nil, us_drivers_license_number: nil, us_drivers_license_state: nil, email: "[email protected]", encrypted_password: "$2a$04$vn3rTgvKV3.z7fXHE6JtROG90i5D8nq/PQxr3wgddye6...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, confirmation_token: "47c67ba52edc223196b38f9f351aefe1b357f9b5c613ecc11b1...", confirmed_at: nil, confirmation_sent_at: "2014-01-23 23:44:02", unconfirmed_email: nil, failed_attempts: 0, unlock_token: nil, locked_at: nil, created_at: "2014-01-23 23:44:02", updated_at: "2014-01-23 23:44:02">, attribute: notification_preferences
bitmasks = {:read_lifesavers=>{"message_owner"=>1, "special_offers"=>2, "pre_approvals"=>4}, :notification_preferences=>{"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}}
mapping: {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
1. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
2. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
stored = 63
extract values = [:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email]
3.. mapping = {"text_messaging"=>1, "offers_email"=>2, "news_email"=>4, "reminder_emails"=>8, "upcoming_rental_email"=>16, "recieved_review_email"=>32}
val= mapping: nil
val: self: [:text_messaging, :offers_email, :news_email, :reminder_emails, :upcoming_rental_email, :recieved_review_email]
creates a user (FAILED - 1)
Failures:
1) Users::RegistrationsController POST create creates a user
Failure/Error: post :create, user: valid_params
NoMethodError:
undefined method `key?' for nil:NilClass
# /Users/doug/code/2014/libraries/bitmask_attributes/lib/bitmask_attributes/value_proxy.rb:41:in `block in validate!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment