jordanstephens jordanstephens - 9 months ago 19
Ruby Question

Test that hash contains specific keys and that values for those keys are not nil

How can I test that a method returns a hash that contains specific keys and the values for those keys are not nil using RSpec?

Answer

something like this:

test_method.values_at("key1", "key2").should_not include(nil)