Refactored specs to use the new RSpec expect syntax