Sha256: 49481b54fc21e59bc192303b9cfafa530ba91e913464aa8e6f0f4dd7652b1f11
Contents?: true
Size: 539 Bytes
Versions: 11
Compression:
Stored size: 539 Bytes
Contents
# encoding: utf-8 require File.join(File.dirname(__FILE__), 'test_helper') class MyTestCell < ::Cell::Base def state_with_instance_var @my_ivar = 'value from cell' render end end class BugsTest < ActionController::TestCase def test_controller_overriding_cell_ivars @controller.class_eval do attr_accessor :my_ivar end @controller.my_ivar = 'value from controller' cell = MyTestCell.new(@controller) c = cell.render_state(:state_with_instance_var) assert_equal 'value from cell', c end end
Version data entries
11 entries across 11 versions & 1 rubygems