I have a hotel.rb file. I used RSpec to test validations, associations and other actions, but how do I test the rails_admin block? Any sample code will be really appreciated.
class Hotel < ActiveRecord::Base
belongs_to :city
validates_uniqueness_of :name, scope: :city_id
# how do I test this?
rails_admin do
visible false
end
end
You can get the abstract model, that the rails admin is using, and read the config from it.
Small example for Rspec: