Sha256: 9d53d751ead9fa8c45f6fbe15adbf97b7fe5e299824db98200a5def039dc5c91

Contents?: true

Size: 539 Bytes

Versions: 18

Compression:

Stored size: 539 Bytes

Contents

require 'test_helper'

class HelpersTest < Draper::TestCase
  def test_access_helpers_through_helper
    assert_equal "<p>Help!</p>", helper.content_tag(:p, "Help!")
  end

  def test_access_helpers_through_helpers
    assert_equal "<p>Help!</p>", helpers.content_tag(:p, "Help!")
  end

  def test_access_helpers_through_h
    assert_equal "<p>Help!</p>", h.content_tag(:p, "Help!")
  end

  def test_same_helper_object_as_decorators
    decorator = Draper::Decorator.new(Object.new)

    assert_same decorator.helpers, helpers
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
draper-4.0.2 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-4.0.1 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-4.0.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-3.1.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-3.0.1 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-3.0.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-3.0.0.pre1 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper_new-3.0.0 spec/dummy/test/decorators/test_unit/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/test_unit/helpers_test.rb
draper-2.1.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-2.0.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.4.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.3.1 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.3.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.2.1 spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.2.0 spec/dummy/test/decorators/test_unit/helpers_test.rb
jamesgolick-draper-1.1.1a spec/dummy/test/decorators/test_unit/helpers_test.rb
draper-1.1.0 spec/dummy/test/decorators/test_unit/helpers_test.rb