1
일부 rspec 테스트가 있습니다. 나는 RSpec을 실행하면 예를 들어rspec에서 의미가 <top (필수)>입니까?
require 'spec_helper'
describe UsersController do
before (:each) do
@user = FactoryGirl.create(:user)
sign_in @user
end
describe "GET 'show'" do
it "should be successful" do
get :show, :id => @user.id
response.should be_success
end
it "should find the right user" do
get :show, :id => @user.id
assigns(:user).should == @user
end
end
end
내가 얻을 몇 가지 오류
평균을 수행하고 무엇을 그 RSpec에와 문제가 될 수 무엇Failures:
1) UsersController GET 'show' should be successful
Failure/Error: @user = FactoryGirl.create(:user)
ActiveRecord::StatementInvalid:
SQLite3::SQLException: near "SAVEPOINT": syntax error: SAVEPOINT active_record_1
# ./spec/controllers/users_controller_spec.rb:6:in `block (2 levels) in <top (required)>'
2) UsersController GET 'show' should find the right user
Failure/Error: @user = FactoryGirl.create(:user)
ActiveRecord::StatementInvalid:
SQLite3::SQLException: near "SAVEPOINT": syntax error: SAVEPOINT active_record_1
# ./spec/controllers/users_controller_spec.rb:6:in `block (2 levels) in <top (required)>'
rspec ./spec/controllers/users_controller_spec.rb:12 # UsersController GET 'show' should be successful
rspec ./spec/controllers/users_controller_spec.rb:17 # UsersController GET 'show' should find the right user
?
이 답변을 확인해보십시오 : http://stackoverflow.com/questions/6330657/what-does-top-required-mean-in-a-ruby-stack-trace – orde