spec/support/shared_examples.rb in MonkeyEngine-2.0.0 vs spec/support/shared_examples.rb in MonkeyEngine-2.0.1
- old
+ new
@@ -1,30 +1,30 @@
# frozen_string_literal: true
# Shared for monkey action.
shared_examples_for 'MonkeyAction' do
- it 'should have read access to monkey' do
- @it.respond_to?(:monkey).should == true
+ it 'has read access to monkey' do
+ @it.respond_to?(:monkey).should be true
end
- it 'should not have write access to monkey' do
+ it 'does not have write access to monkey' do
@it.respond_to?(:monkey=).should_not == true
end
- it_should_behave_like 'Action'
+ it_behaves_like 'Action'
end
# Action
shared_examples_for 'Action' do
- it 'should respond_to? :value' do
+ it 'respond_to?s :value' do
# "Value: #{@it.value}"
- @it.respond_to?(:value).should == true
+ @it.respond_to?(:value).should be true
end
- it 'should respond_to? :weight' do
+ it 'respond_to?s :weight' do
# "Weight: #{@it.weight}"
- @it.respond_to?(:weight).should == true
+ @it.respond_to?(:weight).should be true
end
# value
it '@value should not be nil?' do
@it.value.nil?.should_not == true
@@ -34,8 +34,8 @@
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 == true
+ @it.weight.is_a?(Float).should be true
end
end