Sha256: df2c404ede3ae13269c893661c233ac000fc1aa7529169ae6dfad607d674654e
Contents?: true
Size: 720 Bytes
Versions: 25
Compression:
Stored size: 720 Bytes
Contents
require 'rails_helper' require 'active_admin/helpers/settings' describe ActiveAdmin::Settings do # A Class with settings module included let(:klass) do Class.new do include ActiveAdmin::Settings end end it "should add a new setting with a default" do klass.setting :my_setting, "Hello World" expect(klass.default_settings[:my_setting]).to eq "Hello World" end it "should initialize the defaults" do klass.setting :my_setting, "Hello World" expect(klass.new.my_setting).to eq "Hello World" end it "should support settings of nil" do klass.setting :my_setting, :some_val inst = klass.new inst.my_setting = nil expect(inst.my_setting).to eq nil end end
Version data entries
25 entries across 25 versions & 4 rubygems