# # # test_zones_controller.rb # # Created on 20/09/2007, 11:36:43 # require File.join(File.dirname(__FILE__), 'little_rails_app.rb') describe "Checking AutoRest's defaults for ZonesController" do it "Should have data in the managed controller " do ZonesController.ardata.should_not be_nil end f= [[:name, "Name"]] b= Struct::ARBreadcrumbs.new(nil, nil, 'Zones ', 'Zone ', AutoRest::Labels.defaults[:breadcrumbs_newlabel], AutoRest::Labels.defaults[:breadcrumbs_separator]) options= { :resource => Struct::ARResource.new('zone', 'zones', Zone, 'Zone', ""), :parent_resources => Set.new, :parent_ids => Set.new, :foreing_models => Hash.new, :exclude_fields => Struct::ARFields.new, :fields => Struct::ARFields.new(f, f, f, f), :hidden_fields => Set.new, :breadcrumbs => b, :templates => CUSTOM_TEMPLATES, :labels => AutoRest::Labels.defaults.merge({:search_title => "

Busqueda Zones

"}), :exclude_methods => [], :only_methods => [], :methods => Set.new([:index, :show, :edit, :create, :update, :new, :destroy, :search]), :exclude_links => [], :only_links => [], :links => Set.new([:index, :show, :edit, :create, :update, :new, :destroy, :back, :search]), :index_finder => {}, :ferret => ferret_addon, :will_paginate => wp_addon } options.each do |key, value| it "Should have correct defaults for ZonesController.ardata.#{key}" do ZonesController.ardata.send(key).should == value end end end