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

Fix failing specs re Rails 5.1 #800

Merged
merged 2 commits into from
May 5, 2017

Conversation

barthez
Copy link
Contributor

@barthez barthez commented May 5, 2017

Description

Because there is no hard constraint on Rails version, tests run against the newest version available. Rails 5.1 removes to_h from unpermitted parameters class. Using empty? is a sufficient replacement.

Also, Rails 5.1 does not accept :text option for render. Using :html should do a job.

Testing

rspec ./spec/draper/view_context/build_strategy_spec.rb:33

RAILS_ENV=development rspec spec/integration/integration_spec.rb

Because there is no hard constraint on Rails version, tests run against
the newest version available. Rails 5.1 removes `to_h` from unpermitted
parameters class. Using `empty?` is sufficient replacement.
Rails 5.1 does not accept `:text` key for `render`.
Copy link
Collaborator

@codebycliff codebycliff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🎉

@codebycliff codebycliff merged commit af7f3a6 into drapergem:master May 5, 2017
@barthez barthez deleted the fix-failing-spec-re-rails-5-1 branch May 16, 2017 14:05
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

Successfully merging this pull request may close these issues.

2 participants