Set links in layout.Improve rspec test