rspec で実行しようとしているコードがあります。
require 'spec_helper'
describe "User" do
before { @user = User.new(name: "Example User", email: "user@example.com", password: "foobar", password_confirmation: "foobar") }
subject { @user }
it { should respond_to(:name)}
end
次のエラーが表示されます
c:\Sites\sample_app>rspec spec/models/user_spec.rb
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec
/core/configuration.rb:819:in `load': c:/Sites/sample_app/spec/models/user_spec.
rb:1: syntax error, unexpected tIDENTIFIER, expecting end-of-input (SyntaxError)
before { @user...er'
新しいファイルにテストを再入力して実行すると、エラーは発生しません。エンコーディングの問題、または私が得ていないことについてまだ学んでいない何かがあると思います。この問題に光を当てることができる人はいますか?