Making constant assignment conditional to eliminate RSpec warnings.