change lines to each in spec_state.rb