There was a problem with Rails / Cucumber / Haml. The following Haml file works fine in the development environment and in real time, but in Cucumber it does not work with the following error:
/app/views/competitions/show.haml:30: syntax error, unexpected kENSURE, expecting $end (ActionView::TemplateError)
On line
Line number 30 is the end of the file. It works in Ham.3 version 2.2.3, but not in later versions (I tried 2.2.23, 2.2.22, 2.2.17)
- title @competition.name
%h1
=h @competition.name
- if @competition.image?
= image_tag(@competition.image_url)
= RedCloth.new(@competition.description).to_html
%h2
=h @competition.question
%p
- if @competition.running?
= link_to 'Enter competition', enter_path(:id => @competition.secret)
- else
= case @competition.state
- when 'scheduled' then 'Competition has not opened'
- when 'closed' then 'Competition closed'
if can? :update, @competition
= link_to 'Edit', edit_competition_path(@competition)
|
- if can? :show_stats, @competition
= link_to 'View stats', competition_stats_path(@competition)
Any ideas what is going on?
source
share