Sha256: 3c4bc524ab8812123fe8e8d38f4fbb98dda5de6c70407de25a95a2bf911739d1

Contents?: true

Size: 561 Bytes

Versions: 20

Compression:

Stored size: 561 Bytes

Contents

require 'minitest_helper'

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

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

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

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

    assert_same decorator.helpers, helpers
  end
end

Version data entries

20 entries across 20 versions & 4 rubygems

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