We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It raises the error of wrong number of arguments when exec Cell::Testing#call with keyword args in ruby 3.0.
Cell::Testing#call
ref: taketo1113@4505a53
# test/testing_test.rb class CapybaraTest < MiniTest::Spec class CapybaraCell < Cell::ViewModel def show_with_keyargs(text: '') "<p>text</p>" end end describe "capybara support" do subject { cell("capybara_test/capybara", nil) } it { _(subject.(:show_with_keyargs, text: 'with keyargs').has_selector?('p')).must_equal true } end end
It will pass test show_with_keyargs cell with keyword args.
show_with_keyargs
It raises the below error.
1) Error: capybara support#test_0002_anonymous: ArgumentError: wrong number of arguments (given 1, expected 0) /path/cells/test/testing_test.rb:50:in `show_with_keyargs' /path/cells/lib/cell/view_model.rb:114:in `render_state' /path/cells/lib/cell/caching.rb:48:in `render_state' /path/cells/lib/cell/view_model.rb:92:in `call' /path/cells/lib/cell/testing.rb:47:in `call' /path/cells/test/testing_test.rb:63:in `block (2 levels) in <class:CapybaraTest>' 114 runs, 156 assertions, 0 failures, 1 errors, 0 skips Focus on failing tests: ruby test/testing_test.rb -l 63
It can't get show_with_keyargs args of keyword args in CapybaraCell#show_with_keyargs. Because Cell::Testing#call does not support keyword args.
CapybaraCell#show_with_keyargs
https://github.com/trailblazer/cells/blob/master/lib/cell/testing.rb#L46-L48
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
It raises the error of wrong number of arguments when exec
Cell::Testing#call
with keyword args in ruby 3.0.Steps to reproduce
ref: taketo1113@4505a53
Expected behavior
It will pass test
show_with_keyargs
cell with keyword args.Actual behavior
It raises the below error.
It can't get
show_with_keyargs
args of keyword args inCapybaraCell#show_with_keyargs
.Because
Cell::Testing#call
does not support keyword args.https://github.com/trailblazer/cells/blob/master/lib/cell/testing.rb#L46-L48
System configuration
The text was updated successfully, but these errors were encountered: