simplifying view tests and injecting models into views