Michael Hartl's Railsチュートリアルで作業していますが、現在は第5章です。しかし、Rspec、スパーク、オートテストを実行することはできません。それらを実行しようとすると、エラーメッセージが表示されます。Ruby on RailsアプリケーションでRspec、spork、auto testを実行できません
Paul-Denlingers-MacBook-Pro:sample_app_2 pdenlinger$ rspec spec/
No DRb server is running. Running in local process instead ...
/Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load': /Users/pdenlinger/rails_projects/sample_app_2/spec/controllers/pages_controller_spec.rb:14: syntax error, unexpected keyword_end, expecting $end (SyntaxError)
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:66:in `rescue in run'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:62:in `run'
from /Users/pdenlinger/.rvm/gems/[email protected]/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'
これはどういう意味ですか、どうすれば修正できますか?前もって感謝します!
pages_controller_spec.rb
require 'spec_helper'
describe "LayoutLinks" do
it "should have a Home page at '/' do"
get '/'
response.should have_selector('title', :content => "Home")
end
it "should have a Contact page at '/contact' do"
get '/contact'
response.should have_selector('title', :content => "Contact")
end
it "should have a About page at '/about' do"
get '/about'
response.should have_selector('title', :content => "About")
end
it "should have a Help page at '/help' do"
get '/help'
response.should have_selector('title', :content => "Help")
end
end
これは奇妙です。私はそれに間違っていたものを見つけることができませんでした。上記のコードに貼り付けてあります。 – pdenlinger
私は必要な修正を加えて投稿を拡大しました。上記を参照。 –