Sha256: ddff74e4b702edaec20a39e72504febe76371f9fff16b389293619df6843d52c
Contents?: true
Size: 657 Bytes
Versions: 1
Compression:
Stored size: 657 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe ':idy_options' do describe '.idy_options' do context 'when has options' do it 'returns the options' do expect(Comment.new.idy_options).to eq(salt: 'salt') end end context 'when has no options' do it 'returns an default one' do expect(Clean.new.idy_options).to eq(salt: clean_default_salt) end end end describe '#idy_options' do before do allow(Clean).to receive(:idy_options) { :idy_options } end it 'delegates to class method' do expect(Clean.new.idy_options).to eq :idy_options end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
idy-0.1.1 | spec/lib/idy/extension/idy_options_spec.rb |