[英]'No tests were found' when trying to run rspec on Rubymine
I'm trying to do a Ruby Kada, but when I try to run my spec, I get "No tests were found." 我正在尝试做一个Ruby Kada,但是当我尝试运行我的规范时,我得到“没有找到测试。”
I have 2 files in my project: 我的项目中有2个文件:
poker_hands.rb
, which contains: poker_hands.rb
,其中包含:
def announce_winner (s)
'Player x is the winner.'
end
and poker_hands_spec.rb
, which contains: 和
poker_hands_spec.rb
,其中包含:
require 'rspec'
require 'poker_hands'
define 'poker_hands' do
it 'should announce a winner' do
x = announce_winner('')
x.should == 'Player x is the winner.'
end
end
I'm running RubyMine 4.0.3 and rspec 2.10.0 我正在运行RubyMine 4.0.3和rspec 2.10.0
edit: Here is a copy of my stacktrace 编辑: 这是我的stacktrace的副本
Any ideas? 有任何想法吗?
定义上下文的rspec关键字是describe
,而不是define
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.