Sha256: be3ee89eb3729bf43d0e05be4af00e35bc62d48915560f3c85d236d610282e81

Contents?: true

Size: 652 Bytes

Versions: 9

Compression:

Stored size: 652 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 { view.stub(:_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 { view.stub(:_t).and_return('false') }

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

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-3.0.4 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.3 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.2 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.1 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.0 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.0.rc8 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.0.rc7 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.0.rc6 spec/views/essences/essence_boolean_view_spec.rb
alchemy_cms-3.0.0.rc5 spec/views/essences/essence_boolean_view_spec.rb