# ActiveRecord tests under Ruby 1.9

**URL:** <https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678>\
**Category:** Rails\
**Created:** [October 4, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678 "2009-10-04T21:26:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [October 4, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678/1 "2009-10-04T21:26:44Z")

</div>

I’ve recently updated to Rails 2.3.4 which I run under both Ruby  
1.8.7p173 and 1.9.1p243. I also built both postgresql and mysql from  
source and installed these with a current sqlite3. The relevant  
adapter gems are current.

I’m seeing errors and failures with the active record tests under ruby  
1.9 for all 3 db’s that appear to have more to do with the test  
environment than the individual adapters or underlying db code.

Summary lines for the different dbs are:

sqlite3:  
2072 tests, 6621 assertions, 1 failures, 86 errors, 0 pendings, 0  
omissions, 0 notifications

mysql:  
2112 tests, 6688 assertions, 1 failures, 86 errors, 0 pendings, 0  
omissions, 0 notifications

postgresql:  
2128 tests, 6825 assertions, 2 failures, 87 errors, 0 pendings, 0  
omissions, 0 notifications

The errors all report on undefined method. Three methods are  
identified with the greatest number being ‘expects’ followed by ‘with’  
and ‘stub’. These errors do not occur under Ruby 1.8

Any thoughts?

---

<div class="post-metadata">

**Author:** ![ricklach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Post date:** [October 23, 2009, 9:46am UTC](https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678/2 "2009-10-23T09:46:41Z")

</div>

Hi Rick

install the mocha gem  
[http://www.railsfire.com/article/rails-gotchas-undefined-method-expects](http://www.railsfire.com/article/rails-gotchas-undefined-method-expects)
