Sha256: b9d7b88b486ca3fd5110d0e558a015d544b2c682e184d6196e7ca8be87c193d6
Contents?: true
Size: 745 Bytes
Versions: 35
Compression:
Stored size: 745 Bytes
Contents
require 'test_helper' class PassAlongTest < ActiveSupport::TestCase # After a method is called on a Responder, we need to send all instance variables # that were created back to the controller for the view test 'the receiver receives all instance variables from the sender after a method is called' do sam = Sam.new("Sam", "M", "Opportunist") bob = Bob.new PassAlong.all_variables(sam, bob) sam.useless_method assert_equal [:@gender, :@job_title, :@name], bob.instance_variables.sort end class Sam extend AfterDo def initialize(name, gender, job_title) @name = name @gender = gender @job_title = job_title end def useless_method end end class Bob end end
Version data entries
35 entries across 35 versions & 1 rubygems