我确信这是一个微不足道的错字,但我没有看到。这段代码是在削减到最低限度之后,我仍然看到这个语法错误。原谅我的愚蠢,因为我知道,一旦你向我展示我没有看到的东西,我就会感觉到!
FactoryGirl.define do
factory :user do
name "a name"
end
end
@goodguy = FactoryGirl.create (:user, {:name => "a"})
给我:
/Users/pitosalas/.rvm/gems/ruby-1.9.3-p194@repeatsurvey/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load': /Volumes/MonsterHD/mydev/repsurv/spec/models/access_control_spec.rb:29: syntax error, unexpected ',', expecting ')' (SyntaxError)
@goodguy = FactoryGirl.create (:user, {:name => "a"})
^
/Volumes/MonsterHD/mydev/repsurv/spec/models/access_control_spec.rb:29: syntax error, unexpected '}', expecting keyword_end
@goodguy = FactoryGirl.create (:user, {:name => "a"})