Sha256: 7b9afa48b21635e74fb32b749560273490e6648fa358773bac71f3f153032998
Contents?: true
Size: 887 Bytes
Versions: 4
Compression:
Stored size: 887 Bytes
Contents
require 'rails_helper' RSpec.describe CitizenBudgetModel do context 'when using default options' do it 'should use default options' do expect(CitizenBudgetModel.parent_controller).to eq('ApplicationController') expect(CitizenBudgetModel.hidden_fields).to eq({}) end end context 'when using custom options' do before(:all) do CitizenBudgetModel.parent_controller = 'CustomController' CitizenBudgetModel.hidden_fields = {section: [:description, :popover, :modal]} end after(:all) do CitizenBudgetModel.parent_controller = 'ApplicationController' CitizenBudgetModel.hidden_fields = {} end it 'should use custom options' do expect(CitizenBudgetModel.parent_controller).to eq('CustomController') expect(CitizenBudgetModel.hidden_fields).to eq({section: [:description, :popover, :modal]}) end end end
Version data entries
4 entries across 4 versions & 1 rubygems