JC: changed first state to initial_state. Added Rails.env.test? to model and routes.rb. fixed bug in integration test. Spec passes.