1
A
回答
1
我发现答案由我自己......(我是打猎回答这个2小时..发现这个刚刚发布此之后)
在David赫利姆斯基的网站,在文章“Specifying mixins with shared example groups in RSpec-2,”我发现,shared_example可以接受块参数以及include_example能给参数..
shared_example "example_1" do |param|
it "does something" do
xx.should == param
end
end
后来......
include_examples "example_1", :value_1
这与我的情况下工作。
请注意,此参数化记录为黄瓜功能,所以我可以找到RSPec::Core document at Relish,但不在类文档中。
相关问题
- 1. 重写共享示例组中rspec2
- 2. 使用动态计算参数调用共享示例
- 3. BindingAdapers共享参数
- 4. 使用tf.contrib.layers.convolution2d时共享参数
- 5. “重新初始化”共享实例
- 6. 子报表查询中共享参数的单提示参数
- 7. Facebook共享器参数
- 8. 使用远程服务的Java序列化和实例共享
- 9. 共享偏好零指示字例外
- 10. 如何设置共享示例?
- 11. 共享实例swift
- 12. 共享NSHTTPCookieStorage实例
- 13. 如何在GnuTLS中使用共享对象构建示例
- 14. Scala - 使用参数实例化泛型?
- 15. SSRS共享数据集与参数
- 16. 实例化参数化类
- 17. googletest中的参数化和共享资源测试
- 18. 在共享库中显式实例化模板化类和dynamic_cast
- 19. 共享数据(例如免费/付费)
- 20. 在Airflow中使用参数的示例?
- 21. 使用共享库
- 22. 使用共享prference
- 23. 在示例中共享控制器中的数据 - AngularJs
- 24. Scalatest共享服务实例
- 25. 共享一个PrintDocument实例
- 26. 保存共享图例ggplot2
- 27. 使用参数制作handleFileupload以共享方法
- 28. 如何将实例变量传递给RSpec共享示例
- 29. android:使用意图共享格式化数据
- 30. 推特:与参数共享链接