2016-08-18 22:11:42 +03:00
|
|
|
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 }
|
2016-08-27 11:52:14 +02:00
|
|
|
it { is_expected.to eq expected_output }
|
2016-08-18 22:11:42 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|