Can I execute method in RSpec describe
or context
block? For example
describe ".test" do
load_test_data.each do |m, e|
it "#{m} to be equal #{e}" do
expect(m).to eq(e)
end
end
end
Where load_test_data
is a function that returns hash {"a" => "a", "b" => "b", "c" => "c"}
Aucun commentaire:
Enregistrer un commentaire