spec/show_models_spec.rb in pry-rails-0.3.8 vs spec/show_models_spec.rb in pry-rails-0.3.9
- old
+ new
@@ -56,10 +56,10 @@
output.gsub!(/^ *_type: String\n/, '') # mongoid 3.0 and 3.1 differ on this
output.gsub!(/Moped::BSON/, 'BSON') # mongoid 3 and 4 differ on this
expected_output += mongoid_models
end
- if Rails.version.to_s =~ /^5/
+ if Rails::VERSION::MAJOR >= 5
expected_output = internal_models + expected_output
end
output.must_equal expected_output
end