Sha256: e20105e408d35a9d50dcf718cd91eead9ca19dc0075099a3377177813d990f48

Contents?: true

Size: 678 Bytes

Versions: 18

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

describe 'alchemy/essences/_essence_boolean_view' do

  context 'with true as ingredient' do
    let(:content) { Alchemy::EssenceBoolean.new(ingredient: true) }
    before { allow(view).to receive(:_t).and_return('true') }

    it "renders true" do
      render content, content: content
      expect(rendered).to have_content('true')
    end
  end

  context 'with false as ingredient' do
    let(:content) { Alchemy::EssenceBoolean.new(ingredient: false) }
    before { allow(view).to receive(:_t).and_return('false') }

    it "renders false" do
      render content, content: content
      expect(rendered).to have_content('false')
    end
  end

end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.3 spec/views/essences/essence_boolean_view_spec.rb
lc_alchemy_cms-3.2.1 spec/views/essences/essence_boolean_view_spec.rb
lc_alchemy_cms-3.2.0 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.2.0 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.2.0.rc1 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.2.0.beta spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.1 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.rc3 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.rc2 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.rc1 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta6 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta5 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta4 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta3 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta2 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.1.0.beta1 spec/views/essences/essence_boolean_view_spec.rb