我正在用 Aruba 测试宝石。我的问题是,即使我在 bin 目录中没有任何内容,当我运行“可执行文件”时的步骤也会通过。这是场景。
Scenario: Send SMS
When I run `serialsms`
Then message should be sent
功能/支持/env.rb
$LOAD_PATH.push File.join(File.dirname(__FILE__), "/../../lib" )
ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
require 'serial_sms'
require 'aruba/cucumber'
黄瓜产量
Scenario: Send SMS # features/send_sms_cli.feature:7
When I run `serialsms` # aruba-0.4.9/lib/aruba/cucumber.rb:56
Then message should be sent # features/send_sms_cli.feature:9
1 scenario (1 undefined)
2 steps (1 undefined, 1 passed)
0m0.123s
You can implement step definitions for undefined steps with these snippets:
Then /^message should be sent$/ do
pending # express the regexp above with the code you wish you had
end
这是 Aruba 的正常行为还是我做错了什么。