Sha256: 554fc9e78a27e399103807385a3d17d75e6b8baeb62c3d2274f4bb2b62b25d86

Contents?: true

Size: 893 Bytes

Versions: 4

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'

describe Alchemy::EssencesHelper do

  before(:each) do
    @element = Factory(:element)
    @element.content_by_name('intro').essence.update_attributes(:body => 'hello!')
  end

  it "should render an essence" do
    content = @element.content_by_name('intro')
    render_essence(content).should match(/hello!/)
  end

  it "should render an essence view" do
    content = @element.content_by_name('intro')
    render_essence_view(content).should match(/hello!/)
  end

  it "should render an essence view by name" do
    render_essence_view_by_name(@element, 'intro').should match(/hello!/)
  end

  it "should render an essence view by type" do
    render_essence_view_by_type(@element, 'EssenceText').should match(/hello!/)
  end

  it "should render an essence view by position" do
    render_essence_view_by_position(@element, 1).should match(/hello!/)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alchemy_cms-2.2.rc6 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.2.rc3 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.2.rc2 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.2.rc1 spec/helpers/essences_helper_spec.rb