Sha256: c1afba12023a8ed2e337e208c14d82ca76081566d27d281250ad6c9d17cbb5f7
Contents?: true
Size: 1.12 KB
Versions: 4
Compression:
Stored size: 1.12 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ActiveAdmin, "rendering the dashboard" do # Setup a controller spec include RSpec::Rails::ControllerExampleGroup render_views metadata[:behaviour][:describes] = Admin::DashboardController before :all do load_defaults! reload_routes! end context "when no configuration" do before do get :index end it "should render the default message" do response.should have_tag("p", :attributes => { :id => "dashboard_default_message" }) end end context "when one configuration" do before do ActiveAdmin.dashboard_section 'Hello World' do content_tag :p, "Hello world from the content" end get :index end it "should render the section's title" do response.should have_tag("h3", "Hello World") end it "should render the section's content" do response.should have_tag("p", "Hello world from the content") end end context "when many configurations" do it "should render each section" it "should render the sections by priority, then alpha" end end
Version data entries
4 entries across 4 versions & 1 rubygems