esp32_ethernet_milight_hub/test/remote/helpers/state_helpers.rb

7 lines
295 B
Ruby
Raw Normal View History

2021-01-15 21:49:01 +00:00
module StateHelpers
ALL_REMOTE_TYPES = %w(rgb rgbw rgb_cct cct fut089 fut091)
def states_are_equal(desired_state, retrieved_state)
expect(retrieved_state).to include(*desired_state.keys)
expect(retrieved_state.select { |x| desired_state.include?(x) } ).to eq(desired_state)
end
end