Gemfile: group :test, :development do gem 'rspec-rails', '~>2.10.0' gem "cucumber-rails", ">= 0.3.2" gem 'watchr' gem 'spork' #gem 'rack-rewrite', '~> 1.0.2' end
/spec/controllers/bookings_controller_spec: require 'spec_helper'
describe BookingsController do describe "POST create" do it "creates a new message" it "saves the message" end end
错误信息:
rake spec --trace
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:test:load_schema (first_time)
** Invoke db:test:purge
** Execute db:test:load_schema
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Execute spec
/home/liush/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec ./spec/controllers/bookings_controller_spec.rb
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:317:in rescue in depend_on': No such file to load -- /home/liush/source/rails_test/langleycms/app/mailers/refinery/blog/comment_mailer (LoadError)
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:312:in
depend_on'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:225:in require_dependency'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:439:in
block (2 levels) in eager_load!'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:438:in each'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:438:in
block in eager_load!'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:436:in each'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:436:in
eager_load!'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/application/railties.rb:8:in each'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/application/railties.rb:8:in
all'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/engine.rb:434:in eager_load!'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/application/finisher.rb:53:in
block in module:Finisher'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/initializable.rb:30:in instance_exec'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/initializable.rb:30:in
run'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/initializable.rb:55:in block in run_initializers'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/initializable.rb:54:in
each'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/initializable.rb:54:in run_initializers'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/application.rb:136:in
initialize!'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in method_missing'
from /home/liush/source/rails_test/langleycms/config/environment.rb:5:in
'
from /home/liush/source/rails_test/langleycms/spec/spec_helper.rb:3:in require'
from /home/liush/source/rails_test/langleycms/spec/spec_helper.rb:3:in
'
from /home/liush/source/rails_test/langleycms/spec/controllers/bookings_controller_spec.rb:1:in require'
from /home/liush/source/rails_test/langleycms/spec/controllers/bookings_controller_spec.rb:1:in
'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/configuration.rb:746:in load'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/configuration.rb:746:in
block in load_spec_files'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/configuration.rb:746:in map'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/configuration.rb:746:in
load_spec_files'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb:22:in run'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/runner.rb:69:in
run'
from /home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/runner.rb:10:in block in autorun'
rake aborted!
/home/liush/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec ./spec/controllers/bookings_controller_spec.rb failed
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/rake_task.rb:137:in
block (2 levels) in initialize'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:60:in verbose'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rspec-core-2.10.0/lib/rspec/core/rake_task.rb:127:in
block in initialize'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
block in execute'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
execute'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:158:in block in invoke_with_call_chain'
/home/liush/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/task.rb:144:in
invoke'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
block (2 levels) in top_level'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
block in top_level'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:88:in
top_level'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:66:in block in run'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
standard_exception_handling'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/gems/rake-0.9.2.2/bin/rake:33:in
'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/bin/rake:19:in load'
/home/liush/.rvm/gems/ruby-1.9.3-p125@one_blog/bin/rake:19:in