基于此,我将以下宝石添加到我的文件中 -
group :test, :development do
gem 'turn'
gem 'rspec-rails'
gem 'capybara'
gem 'guard-rspec'
gem 'libnotify'
end
我比运行以下命令 -
rails g rspec:install
guard init rspec
guard
我在运行警卫时收到以下错误。相反,我应该看到失败的测试。我已经生成了一个集成测试 -
守在这里!看起来您的项目有一个 Gemfile,但您在
guard
Bundler 之外运行。如果这是您的意图,请随时忽略此消息。否则,请考虑使用bundle exec guard
以确保正确加载您的依赖项。(您可以guard
使用 --no-bundler-warning 运行以消除此消息。)Guard 使用 Libnotify 发送通知。Guard 现在在 '/home/murtaza/workspace/rails/tasks' 观看 Guard::RSpec 正在运行,使用 RSpec 2!
<class:TestCase>': uninitialized constant Test::Unit::TestCase::Assertions (NameError) from /home/murtaza/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit/testcase.rb:8:in
从 /home/murtaza/运行所有规格 gem install minitest /home/murtaza/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit/testcase.rb:9:in ' .rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit/testcase.rb:4:in<module:Test>' from /home/murtaza/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit/testcase.rb:3:in
'来自/home/murtaza/.rvm/rubies/ruby-1.9.3- p194/lib/ruby/1.9.1/test/unit.rb:5:in<top (required)>' from /home/murtaza/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit/assertions.rb:4:in
'来自 /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-rails-2.11.0/lib /rspec/rails/adapters.rb:2:in<top (required)>' from /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-rails-2.11.0/lib/rspec/rails.rb:10:in
'来自 /home/murtaza/workspace/rails/tasks/spec/spec_helper.rb:4:in<top (required)>' from /home/murtaza/workspace/rails/tasks/spec/requests/tasks_spec.rb:1:in
要求'来自 /home/murtaza/workspace/rails/tasks/spec/请求/tasks_spec.rb:1:in<top (required)>' from /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in
从/home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:inblock in load_spec_files' from /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in
map'从/home/加载' murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:inload_spec_files' from /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in
run' from /home/murtaza/.rvm/gems /ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:inrun' from /home/murtaza/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in
block in autorun' >