Sha256: 48b26976c39fac818d16d1c545b672aba17a3f95d183c54998d3dcae1e301aea

Contents?: true

Size: 1.5 KB

Versions: 12

Compression:

Stored size: 1.5 KB

Contents

require 'spec_helper'

describe 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

	it "should render an essence editor" do
	  content = @element.content_by_name('intro')
    render_essence_editor(content).should match(/input.+type="text".+value="hello!/)
	end

  it "should render an essence editor by name" do
    render_essence_editor_by_name(@element, 'intro').should match(/input.+type="text".+value="hello!/)
  end

  it "should render an essence editor by type" do
    render_essence_editor_by_type(@element, 'EssenceText').should match(/input.+type="text".+value="hello!/)
  end

  it "should render an essence editor by position" do
    render_essence_editor_by_position(@element, 1).should match(/input.+type="text".+value="hello!/)
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-2.0.6.1 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.5 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.4 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.3.1 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.1.beta1 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.3 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.2 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.1 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.rc6 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.rc5 spec/helpers/essences_helper_spec.rb
alchemy_cms-2.0.rc4 spec/helpers/essences_helper_spec.rb