Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut syntax does not work with rspec #9

Closed
josevalim opened this issue Aug 31, 2009 · 1 comment
Closed

Shortcut syntax does not work with rspec #9

josevalim opened this issue Aug 31, 2009 · 1 comment

Comments

@josevalim
Copy link
Contributor

The syntax:

def create
  create!{ another_url }
end

Does not work with Rspec controller specs if integrate views is false because that template is executed just if a template is not found. Since rspec hacks all templates to be found on integrate_views equals to true, the code is never executed. The solution is to use success and failure blocks:

def create
  create! do |success, failure| 
    success.html { another_url }
  end
end
@josevalim
Copy link
Contributor Author

This was not fixed, but a warning was added to README.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant