Sha256: aad99f0ad68fe60b05a237f9ceeb397a9bfa6821801887e1b2d3f235df8accc0

Contents?: true

Size: 643 Bytes

Versions: 12

Compression:

Stored size: 643 Bytes

Contents

require_relative '../../spec_helper.rb'

RSpec.describe SmartTable::Config do

  describe 'accessors and default values' do
    it 'should have accessors for all configurations, initialized with default values' do
      SmartTable::Config::DEFAULT_CONFIGS.each do |config_name, default_value|
        # test writter
        initial_value = described_class.send(config_name)
        expect(described_class.send(config_name.to_s + '=', 1435))
        expect(described_class.send(config_name)).to be == 1435

        # restores initial value
        expect(described_class.send(config_name.to_s + '=', initial_value))
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
smart_table-0.0.12 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.11 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.10 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.9 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.8 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.7 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.6 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.5 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.4 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.3 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.2 ./spec/smart_table/lib/config_spec.rb
smart_table-0.0.1 ./spec/smart_table/lib/config_spec.rb