Sha256: 2332bd664966e6adf5f37f32eb461c6d0e4c555984e4fc451dffa21e8cfab76f

Contents?: true

Size: 1.29 KB

Versions: 7

Compression:

Stored size: 1.29 KB

Contents

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

describe "re_whitebox" do 
  include RSpec::Rails::HelperExampleGroup
  
  def call_re_whitebox
    helper.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 be html safe" do
    call_re_whitebox().should be_html_safe
  end      
  
  it "should wrap the content in a whitebox" do
    call_re_whitebox().should have_selector('div.re-whitebox div.re-whitebox-content', :content => "body text")
    call_re_whitebox().should have_selector('div.re-whitebox div.clear')
  end
end


describe "re_shadowbox" do 
  include RSpec::Rails::HelperExampleGroup
  
  def call_re_shadowbox
    helper.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 be html safe" do
    call_re_shadowbox.should be_html_safe
  end      

  it "should wrap the content in a shadowbox" do
    call_re_shadowbox.should have_selector('div.re-shadowbox-outer div.re-shadowbox-inner', :content => "body text")
    call_re_shadowbox.should have_selector('div.re-shadowbox-outer div.clear')
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rules_view-0.0.3 spec/lib/rules_view/boxes_spec.rb
rules_view-0.0.2 spec/lib/rules_view/boxes_spec.rb
rules_view-0.0.1 spec/lib/rules_view/boxes_spec.rb
rules_engine-0.3.3 spec/lib/rules_engine_view/boxes_spec.rb
rules_engine-0.3.2 spec/lib/rules_engine_view/boxes_spec.rb
rules_engine-0.3.1 spec/lib/rules_engine_view/boxes_spec.rb
rules_engine-0.3.0 spec/lib/rules_engine_view/boxes_spec.rb