Sha256: 53d776c582ea81eba6e4788d395358ca1a49c42dbecbedd4f16ff8dc78c75f7c

Contents?: true

Size: 825 Bytes

Versions: 1

Compression:

Stored size: 825 Bytes

Contents

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

describe Rtml::Dom::ScreenElement do
  before :each do
    @ele = Rtml::Dom::ScreenElement.new(:name => :screen)
  end

  it "should convert its name to a string after instantiation" do
    @ele.name.should be_a_kind_of(String)
  end

  it "should not prepend ids with slashes in them with a #" do
    @ele.property('next', "emb://embedded.tml")
    @ele.to_tml.should_not =~ /\#/
  end

  it "should not lose # in submit econn" do
    @ele.build :submit, :tgt => "a/path/to/somewhere", :econn => "#submit_err", :cache => "deny"
    @ele.to_tml.should =~ /econn="#submit_err"/
  end

  it "should not prepend # if there is a colon (:)" do
    @ele.next_screen "tmlvar:something"
    @ele.to_tml.should =~ /next uri="tmlvar:something"/
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rtml-2.0.4 spec/models/rtml/dom/screen_element_spec.rb