On Tuesday, 27 July 2021 at 21:42:55 UTC+1 pirj...@gmail.com wrote:
> > It resets the database connection, so a table that is dropped and > recreated with different columns is used correctly > > What do you refer to as "it"? > "it" is the `schema_cache.clear!`, which allows for a table to be dropped and then recreated with different columns. This is what I am doing here - https://github.com/jrmhaig/amoeba/blob/a7ccfc42e8039239858d95964d252f4103e708ea/spec/lib/amoeba/config_spec.rb#L135-L138 - to run the same tests over fields of different data types. > Setting up all different models is sure an option, but as far as I > understand, your aim was to move all the specifics to the specs. > Precisely, but I understand that sometimes the ideal isn't possible. I've not given up quite yet though. > In any case, all the luck with getting to the bottom of this issue. Please > keep us posted on your findings. > The plot thickens. I pulled down Rails from Github so I can try poking around the code there and it appears that this problem goes away in Rails 7.0! Maybe a diff between head and the 6.1 branch will show something ... Regards, Joe -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/f1ff44de-04bb-4e08-8613-5fcc0d176aa7n%40googlegroups.com.