render_template giving false positive #15

Closed
freegenie opened this Issue Dec 3, 2011 · 1 comment

2 participants

@freegenie

Hi, I'm noticing this problem today. I have a controller that conditionally renders two templates, :ask_email and :ask_email_and_interest.

Testing the rendering of :ask_email I get a passing test even if it's rendering :ask_email_and_password template.

response.should render_template('ask_email') # true
response.should render_template('ask_email_and_interest') # true
response.should render_template('a') # true

Using version 2.7.0.

@dchelimsky
Owner

I can't reproduce this against rails 3.1.3. Also, this is the tracker for rspec-rails-1.x. Would you please report this to https://github.com/rspec/rspec-rails/issues and include the rails version you're using and also the conditional code you're using to make the decision about which template to render.

Thx.

@dchelimsky dchelimsky closed this Dec 3, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment