It seems my specs has stopped thinking. The spec does not evaluate the argument in page.should have_content("Logga in på #{farm.name}") as an expression but as a string. I have tried other ways of writing the same expression but it doesn't help.
This is my very simple spec:
# encoding: utf-8 require 'spec_helper' include Warden::Test::Helpers
describe "Pupils" do it "show login page for farm" do farm = Factory.create(:farm) visit new_pupil_session_path page.should have_content("Logga in på #{farm.name}") end end
The error I get when I runt it is: 1) Pupils show login page for farm Failure/Error: page.should have_content("Logga in på #{farm.name}") expected there to be content "Logga in på farm_long2" in "horsemanager\
So why does it not evaluate #{farm.name}? It's probably something stupid I have missed.
Appreciate any help!