Sha256: 81ec2328ffca6c2e875a5686a78174592b24b959b24f77af6a8a35dc32f6ffef

Contents?: true

Size: 558 Bytes

Versions: 18

Compression:

Stored size: 558 Bytes

Contents

require 'spec_helper'

describe "A decorator spec" do
  it "can access helpers through `helper`" do
    expect(helper.content_tag(:p, "Help!")).to eq "<p>Help!</p>"
  end

  it "can access helpers through `helpers`" do
    expect(helpers.content_tag(:p, "Help!")).to eq "<p>Help!</p>"
  end

  it "can access helpers through `h`" do
    expect(h.content_tag(:p, "Help!")).to eq "<p>Help!</p>"
  end

  it "gets the same helper object as a decorator" do
    decorator = Draper::Decorator.new(Object.new)

    expect(helpers).to be decorator.helpers
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
draper-4.0.2 spec/dummy/spec/decorators/helpers_spec.rb
draper-4.0.1 spec/dummy/spec/decorators/helpers_spec.rb
draper-4.0.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-3.1.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-3.0.1 spec/dummy/spec/decorators/helpers_spec.rb
draper-3.0.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-3.0.0.pre1 spec/dummy/spec/decorators/helpers_spec.rb
draper_new-3.0.0 spec/dummy/spec/decorators/helpers_spec.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/draper-2.1.0/spec/dummy/spec/decorators/helpers_spec.rb
draper-2.1.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-2.0.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-1.4.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-1.3.1 spec/dummy/spec/decorators/helpers_spec.rb
draper-1.3.0 spec/dummy/spec/decorators/helpers_spec.rb
draper-1.2.1 spec/dummy/spec/decorators/helpers_spec.rb
draper-1.2.0 spec/dummy/spec/decorators/helpers_spec.rb
jamesgolick-draper-1.1.1a spec/dummy/spec/decorators/helpers_spec.rb
draper-1.1.0 spec/dummy/spec/decorators/helpers_spec.rb