Sha256: 284e7cc3294f6e79ac3091a50b87cdfd7e100fb0e0bbbe45d734f48e99e8c12c
Contents?: true
Size: 626 Bytes
Versions: 9
Compression:
Stored size: 626 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 subject.stub(definition: {'hint' => 'The hint'}) end it "returns the hint" do subject.hint.should == 'The hint' end end context 'with hint set to true' do before do subject.stub(definition: {'hint' => true}) I18n.stub(t: 'The hint') end it "returns the hint from translation" do subject.hint.should == 'The hint' end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems