brew/Library/Homebrew/cask/spec/support/expectations_hash_helper.rb
2016-08-27 11:56:52 +02:00

11 lines
342 B
Ruby

module ExpectationsHashHelper
shared_examples "expectations hash" do |input_name, expectations|
expectations.each do |input_value, expected_output|
context "when #{input_name} is #{input_value.inspect}" do
let(input_name.to_sym) { input_value }
it { is_expected.to eq expected_output }
end
end
end
end