jordanstephens jordanstephens - 1 year ago 36
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 Source

something like this:

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