0

我的黄瓜功能之一称为

Then the director of "Alien" should be "Ridley Scott"

我创建了我的步骤定义如下

Then /^the director of "([^"]*)" should be "([^"]*)"$/ do |arg1, arg2|
  Movie.find_by_title(arg1) == Movie.find_by_director(arg2)
end

它通过了测试,但我不相信它是真正正确的。关于实现适当功能的任何建议?

4

1 回答 1

2

怎么样

Movie.find_by_title(arg1).director == arg2
于 2012-06-21T01:29:45.670 回答