[rspec-users] id getting overwritten with 0 when testing

Guyren G Howe gisborne at emailuser.net
Wed Jan 25 19:50:35 EST 2012


On Jan 25, 2012, at 1:56 PM, David Chelimsky wrote:

> I'd start by debugging to see where the wheels fall off. Are you
> familiar/comfortable with Ruby's debugger?

Sure.

What’s happening is that during the save process, I get to field_changed? in dirty.rb, which does

	value = column.type_cast(value)

when I look at column here, it believes @sql_type = “integer”. Which seems weird.

So at this point, it occurs to me to check this against my test database, and the columns in the test database are indeed integers! How does this come to be?


More information about the rspec-users mailing list