Sha256: 9f08fc70231c06be7659455a4a8df52f626c53060133d20bfd5635e99ed17647
Contents?: true
Size: 763 Bytes
Versions: 33
Compression:
Stored size: 763 Bytes
Contents
require 'rails_helper' describe Tabulatr::ParamsBuilder do it 'accepts an argument which is in the ALLOWED_PARAMS array' do pb = nil expect{pb = Tabulatr::ParamsBuilder.new(filter: false)}.to_not raise_error expect(pb.filter).to be_falsey end it 'does not accept a param which is not in the ALLOWED_PARAMS array' do stub_const('Tabulatr::ParamsBuilder::ALLOWED_PARAMS', [:allowed_params]) expect{Tabulatr::ParamsBuilder.new(non_allowed_param: 'test')}.to raise_error(ArgumentError) end it 'does not accept a param which is in the DEPRECATED_PARAMS array' do stub_const('Tabulatr::ParamsBuilder::DEPRECATED_PARAMS', [:deprecated_param]) expect{Tabulatr::ParamsBuilder.new(deprecated_param: 'test')}.to raise_error end end
Version data entries
33 entries across 33 versions & 1 rubygems