Sha256: 5273a48f5fde89f4bbc4bc940d533035c92da7776c1a46b543179b5d42184a27

Contents?: true

Size: 687 Bytes

Versions: 5

Compression:

Stored size: 687 Bytes

Contents

require File.join(__FILE__.gsub(/(.*)?\/spec\/.*$/, '\1'), 'spec/spec_helper')

describe Rtml::Dom::FrontendElement do
  before :each do
    @doc = Rtml::Document.new(:name => 'magcard')
    @doc.view.view_paths << File.join(Rtml.root, "spec/support/app/views")
    @doc.setup_default_document
  end

  it "should infer view content from subprocessing" do
    inner_content = "Hello, World"
    scr = @doc.screen :main
    cnt = scr.static_content { inner_content }
    cnt.to_tml.should == inner_content
  end

  it "should infer view content from document and screen names" do
    scr = @doc.screen :main
    cnt = scr.static_content
    cnt.to_tml.should == "Hello, World!"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rtml-2.0.4 spec/models/rtml/dom/frontend_element_spec.rb
rtml-2.0.3 spec/models/rtml/dom/frontend_element_spec.rb
rtml-2.0.2 spec/models/rtml/dom/frontend_element_spec.rb
rtml-2.0.1 spec/models/rtml/dom/frontend_element_spec.rb
rtml-2.0.0.alpha.1 spec/models/rtml/dom/frontend_element_spec.rb