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

"Missing column" message when actual first row is false and expected true #1

Open
error256 opened this issue Jul 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@error256
Copy link

error256 commented Jul 5, 2023

Code:

select b from (values (false), (true)) bs(b)

Tests:

def expected = DB['select b from (values (true), (false)) bs(b)'].to_a
compare_with(expected)

https://www.codewars.com/kumite/64a5badac6d5e9001f3e6982
column "b" > should be a TrueClass value > missing column "b"

@kazk
Copy link
Member

kazk commented Jul 7, 2023

This is caused by

if (actual_value = actual_row[key])
expect(actual_value).to be_a(value.class), "column \"#{key}\" should be #{value.class}, not #{actual_value.class}"
else
RSpec::Expectations.fail_with("missing column \"#{key}\"")
end

@kazk kazk added the bug Something isn't working label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants