What should we do with outdated benchmarks?

For example here :

before_filter is deprecated syntax in rails 5. Therefore this should be replaced with before_action.
Assuming we want to run suite for previous rails versions (which I think we do) - do you have any good idea how to handle these differences?

In this specific case we can add one condition :

if Rails::VERSION < 5
  before_filter
else
  before_action
end

But assuming we have lot of those specific conditions, maybe better solution would be to have these separated in subfolders.

Thoughts?

Off the top of my head… I think a conditional like that is great in this case. I think we probably want to have a range of Rails versions we support, and for anything older than that, we can drop the conditional.

That wouldn’t work with a huge change in Rails API like between Rails 2 and Rails 3. But I don’t know of anything huge like that coming up any year soon…

2 Likes

Thanks Noah, I will stick to conditional then.