Rails RSpec not seeing new model attributes -



Rails RSpec not seeing new model attributes -

i added new attribute booking model through migration.

class addpickuptimeendandpickupdetailstobookings < activerecord::migration def alter add_column :bookings, :pickup_details, :string end end

i adding validation code:

class booking < activerecord::base [...] validates :pickup_details, length: { maximum: 150 }

and booking model specs failing with:

failure/error: create(:booking) nomethoderror: undefined method `pickup_details' #<booking:0x0000006d043e28>

either messed things awfully, either i'm missing obvious...

did run migrations test environment ?

rails_env=test rake db:migrate

ruby-on-rails rspec

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -