Sha256: bd8ce67929086f9167cb335ad5a3c387a137e7273352e572ddf0502cb8aa4cab

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

require File.expand_path(File.dirname(__FILE__) ) + "/../spec_helper"

describe "re_whitebox", :type => :helper do 
  def call_re_whitebox
    eval_erb("<% re_whitebox do %>body text<% end %>")
  end
  
  it "should be accessible to rails apps by default" do 
    ActionView::Base.new.methods.should include("re_whitebox")
  end
  
  it "should wrap the content in a whitebox" do
    call_re_whitebox().should have_tag('div.re-whitebox div.re-whitebox-content', :text => "body text")
    call_re_whitebox().should have_tag('div.re-whitebox div.clear')
  end
end


describe "re_shadowbox", :type => :helper do 
  def call_re_shadowbox
    eval_erb("<% re_shadowbox do %>body text<% end %>")
  end
  
  it "should be accessible to rails apps by default" do 
    ActionView::Base.new.methods.should include("re_shadowbox")
  end
  
  it "should wrap the content in a shadowbox" do
    call_re_shadowbox.should have_tag('div.re-shadowbox-outer div.re-shadowbox-inner', :text => "body text")
    call_re_shadowbox.should have_tag('div.re-shadowbox-outer div.clear')
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rules_engine-0.2.0 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.10 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.9 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.8 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.7 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.6 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.5 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.4 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.3 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.1 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.1.0 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.8 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.7 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.6 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.5 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.4 spec/rules_engine_view/boxes_spec.rb
rules_engine-0.0.3 spec/rules_engine_view/boxes_spec.rb