更新:我的问题肯定与这个有关- 这是 ActiveRecord 的问题。还是没有解决。
我正在尝试通过 rspec 进行测试,但无法弄清楚出了什么问题......这就是我得到的:
Running: spec/models/user_spec.rb
.
.
.
........F
Failures:
1) User when email address is already taken
Failure/Error: user_with_same_email.save
ActiveRecord::StatementInvalid:
SQLite3::SQLException: near "SAVEPOINT":
syntax error: SAVEPOINT active_record_1
# ./spec/models/user_spec.rb:64:in `block (3 levels) in <top (required)>'
Finished in 0.22908 seconds
9 examples, 1 failure
这是我测试中的相关行:
user_with_same_email.save
尝试写入数据库时它会中断。发展很好 - 没有问题。谢谢