Good to know. Thanks for the heads-up! I probably should be paying more 
attention t the discussions around new versions.

> On Dec 1, 2020, at 7:37 AM, Phil Pirozhkov <[email protected]> wrote:
> 
> Jack,
> 
> > So I have a feeling that this will come back to bite me at some point in 
> > the future.
> 
> Let's see. I wouldn't trust Rails 5.0 deprecations that much, if I recall it 
> correctly, things kept changing back and forth until stabilized in 5.2.
> 
> On Mon, Nov 30, 2020 at 11:48 PM Jack Royal-Gordon <[email protected] 
> <mailto:[email protected]>> wrote:
> Good question. I’m using the “describe” syntax along with 
> config.infer_spec_type_from_file_location!, so the RSpec DSL determines the 
> class. From the backtrace, I can see that it’s coming from 
> ActionDispatch::IntegrationTest.
> 
> I moved forward to RSpec 3.9 (from 3.1), and this problem has changed. Now, 
> instead of complaining about positional arguments, I’m getting
> 
> undefined method `edit_account_activation' for 
> #<RSpec::ExampleGroups::AccountActivationsController::GETEdit:0x00007fb0345841c0>
> 
> In other words, it’s not allowing URL helpers at all. So this resolves things 
> for me (as far as controllers are concerned) — I’ll use the  get ‘action’, 
> params: {…} syntax.
> 
> However, I’m seeing the same error in request specs now. That is, “get 
> edit_account_activation(value)” gives the error
> 
> DEPRECATION WARNING: Using positional arguments in integration tests has been 
> deprecated,  favor of keyword arguments, and will be removed in Rails 5.1.
> 
> I discovered that If I add an empty params hash to the request then the error 
> goes away, (e.g. "get edit_account_activation_path(@user.activation_token), 
> params: {}”).
> 
> 
> This feels like I’ve found a work-around for an issue that should not exist. 
> So I have a feeling that this will come back to bite me at some point in the 
> future.
> 
> 
>> On Nov 30, 2020, at 10:53 AM, [email protected] <http://gmail.com/> 
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
>> That doesn't seem to be entirely correct.
>> 
>> Rails 5 does 
>> https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb#L4
>>  
>> <https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb#L4>
>>  generate a test that uses `ActionDispatch::IntegrationTest`, but it depends 
>> on what your test inherits from.
>> Do you inherit yours from `ActionDispatch::IntegrationTest` or 
>> `ActionController::TestCase`?
>> 
>> `ActionController::TestCase` code is still in Rails 5.0 
>> https://github.com/rails/rails/blob/5-0-stable/actionpack/lib/action_controller/test_case.rb#L388
>>  
>> <https://github.com/rails/rails/blob/5-0-stable/actionpack/lib/action_controller/test_case.rb#L388>
>> and Rails 5.2 
>> https://github.com/rails/rails/blob/5-2-stable/actionpack/lib/action_controller/test_case.rb#L394
>>  
>> <https://github.com/rails/rails/blob/5-2-stable/actionpack/lib/action_controller/test_case.rb#L394>
>> and even Rails 6.0 
>> https://github.com/rails/rails/blob/6-0-stable/actionpack/lib/action_controller/test_case.rb#L394
>>  
>> <https://github.com/rails/rails/blob/6-0-stable/actionpack/lib/action_controller/test_case.rb#L394>
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "rspec" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <mailto:[email protected]>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rspec/806a8626-4568-4ce8-86ed-2260e2ebbfedn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/rspec/806a8626-4568-4ce8-86ed-2260e2ebbfedn%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "rspec" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rspec/437B754E-2CE9-4E72-86E5-4F4B0FA7B253%40pobox.com
>  
> <https://groups.google.com/d/msgid/rspec/437B754E-2CE9-4E72-86E5-4F4B0FA7B253%40pobox.com?utm_medium=email&utm_source=footer>.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "rspec" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rspec/CAAk5Ok-BWVwhcV%3DD_aSDLy9Q%2BKF5WkUY7wfC247OO5HrVxqnAw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/rspec/CAAk5Ok-BWVwhcV%3DD_aSDLy9Q%2BKF5WkUY7wfC247OO5HrVxqnAw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/3C35427A-AF50-4ABA-B92D-1ACCAD18F09D%40pobox.com.

Reply via email to