Sha256: c4e8318ba69f6a0df54aa93acd20230eb30d1cd827e13c8d7034833c6bbddf09
Contents?: true
Size: 797 Bytes
Versions: 28
Compression:
Stored size: 797 Bytes
Contents
require 'active_support/core_ext/string/output_safety' require 'test_setup' class ScriptTagHelperTest < MiniTest::Unit::TestCase include IntercomRails::ScriptTagHelper def test_delegates_to_script_tag_generate delegated = false IntercomRails::ScriptTag.stub(:generate) { delegated = true } intercom_script_tag({}) assert(delegated, "should delegate to ScriptTag#generate") ensure IntercomRails::ScriptTag.rspec_reset end def test_sets_instance_variable fake_action_view = fake_action_view_class.new obj = Object.new fake_action_view.instance_variable_set(:@controller, obj) fake_action_view.intercom_script_tag({}) assert_equal obj.instance_variable_get(IntercomRails::SCRIPT_TAG_HELPER_CALLED_INSTANCE_VARIABLE), true end end
Version data entries
28 entries across 28 versions & 1 rubygems