Sha256: 3a5e62460a231fd06ca8ea484cdd6bac32bacadcceeecb08c125792387d6d6f4
Contents?: true
Size: 714 Bytes
Versions: 18
Compression:
Stored size: 714 Bytes
Contents
require 'spec_helper' module Alchemy shared_examples_for "having a hint" do describe '#hint' do context 'with hint as text' do before do expect(subject).to receive(:definition).and_return({'hint' => 'The hint'}) end it "returns the hint" do expect(subject.hint).to eq('The hint') end end context 'with hint set to true' do before do expect(subject).to receive(:definition).and_return({'hint' => true}) expect(I18n).to receive(:t).and_return('The hint') end it "returns the hint from translation" do expect(subject.hint).to eq('The hint') end end end end end
Version data entries
18 entries across 18 versions & 2 rubygems