Modify assertion for different versions of rails