Rails RSpec not seeing new model attributes -


I added a new feature to my booking model through migration.

  class AddPickupTimeEndAndPickupDetailsToBookings & lt; ActiveRecord :: Migration change change add_column: booking,: pickup_details,: string and end   

I am now adding verification code:

  class booking & lt ; ActiveRecord :: Base [...] Valid: pickup_details, Length: {Max: 150}   

And suddenly all my booking model specs are failing:

  Failure / Error: Create (: Booking) NoMethodError: Undefined Method # & lt; `Pickup_details' for booking: 0x0000006d043e28 & gt;   

Either I was making things very confusing, either I am not clear ...

Have you run a migration for the testing environment?

  Railway_Niv = test rake dB: migrate    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -