Sha256: d923fefcb4c86df53e85b4819151ecd0eaa9f575903a549ebd2c927d02908a3a
Contents?: true
Size: 858 Bytes
Versions: 7
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true # Shared for monkey action. shared_examples_for 'MonkeyAction' do it 'has read access to monkey' do @it.respond_to?(:monkey).should be true end it 'does not have write access to monkey' do @it.respond_to?(:monkey=).should_not == true end it_behaves_like 'Action' end # Action shared_examples_for 'Action' do it 'respond_to?s :value' do # "Value: #{@it.value}" @it.respond_to?(:value).should be true end it 'respond_to?s :weight' do # "Weight: #{@it.weight}" @it.respond_to?(:weight).should be true end # value it '@value should not be nil?' do @it.value.nil?.should_not == true end # weight it '@weight should not be nil?' do @it.weight.nil?.should_not == true end it '@weight should be is_a? Float' do @it.weight.is_a?(Float).should be true end end
Version data entries
7 entries across 7 versions & 1 rubygems