Sha256: a628e5cc9cf733cd614efe77f33c05676178f2db2c700a563289a40138e2e6de

Contents?: true

Size: 391 Bytes

Versions: 15

Compression:

Stored size: 391 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe 'Settings label' do
  it "should have label" do
    label = "E-Mail"
    Settings.email(label: label, default: "my@mail.ru")
    expect(Settings.get(:email).name).to eq(label)
  end

  it "should properly set label as key if blank" do
    Settings.email(default: "my@mail.ru")
    expect(Settings.get(:email).name).to eq('email')
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
thecore_settings-2.0.9 spec/label_spec.rb
thecore_settings-2.0.8 spec/label_spec.rb
thecore_settings-2.0.7 spec/label_spec.rb
thecore_settings-2.0.6 spec/label_spec.rb
thecore_settings-2.0.5 spec/label_spec.rb
thecore_settings-2.0.4 spec/label_spec.rb
thecore_settings-2.0.3 spec/label_spec.rb
thecore_settings-2.0.2 spec/label_spec.rb
rails_admin_settings-1.7.0 spec/label_spec.rb
rails_admin_settings-1.6.0 spec/label_spec.rb
rails_admin_settings-1.5.1 spec/label_spec.rb
rails_admin_settings-1.5.0 spec/label_spec.rb
rails_admin_settings-1.4.2 spec/label_spec.rb
rails_admin_settings-1.4.1 spec/label_spec.rb
rails_admin_settings-1.4.0 spec/label_spec.rb