Sha256: 5e65d7552b41debf71cc12104e3fe957bc29462d825fe72e56afac320885f70d
Contents?: true
Size: 606 Bytes
Versions: 24
Compression:
Stored size: 606 Bytes
Contents
RSpec.describe "EitilCore Object#set_ivars" do def set_ivar_one :one end def set_ivar_two 2 end it 'should call a method .set_#{ivar_name}, for every :ivar_name passed' do set_ivars :ivar_one, :ivar_two expect(@ivar_one).to eq :one expect(@ivar_two).to eq 2 end it "should return an array of symbols, which the names of all ivars being set" do return_value = set_ivars :ivar_one, :ivar_two expect(return_value).to eq [:ivar_one, :ivar_two] end it "should return an empty array, if no arguments are passed" do expect(set_ivars).to eq [] end end
Version data entries
24 entries across 24 versions & 1 rubygems