Sha256: f25fdc1ab0f317229c0aeb57ada7254ef6e1d1aa5344890d0262b11a768b0f2f
Contents?: true
Size: 1019 Bytes
Versions: 12
Compression:
Stored size: 1019 Bytes
Contents
describe Wice::GridOutputBuffer do FILTER_COMMON_CODE = 'here filter code' let(:buffer){Wice::GridOutputBuffer.new} it 'should to_s' do expect(buffer.to_s.class).to eq(ActiveSupport::SafeBuffer) end it 'should add_filter' do expect(buffer.add_filter('key', FILTER_COMMON_CODE)).to eq(FILTER_COMMON_CODE) end it 'should filter_for' do buffer.add_filter('key', FILTER_COMMON_CODE) expect(buffer.filter_for('key')).to eq(FILTER_COMMON_CODE) end it 'should filter_for 2 times' do buffer.add_filter('key', FILTER_COMMON_CODE) expect(buffer.filter_for('key')).to eq(FILTER_COMMON_CODE) expect { buffer.filter_for('key') }.to raise_error(Wice::WiceGridException) end it 'should filter_for without filters' do expect { buffer.filter_for('key') }.to raise_error(Wice::WiceGridException) end it 'should filter_for return empty string' do buffer.return_empty_strings_for_nonexistent_filters = true expect(buffer.filter_for('key')).to eq('') end end
Version data entries
12 entries across 12 versions & 2 rubygems