spec/monkey_service_spec.rb in MonkeyEngine-2.0.0 vs spec/monkey_service_spec.rb in MonkeyEngine-2.0.1

- old
+ new

@@ -22,30 +22,30 @@ # Give them a little bit to finish. @it.join_all(10) end - def update(time, action, param) + def update(time, action, _param) # puts "Time: [#{time}], Action: [#{action}], Param: [#{param}]" puts "Time: [#{time}], Action: [#{action}], Param: <not shown>" end context 'initialization' do - it 'it should have 3 monkeys' do + it 'has 3 monkeys' do @it.count.should == 3 end - it 'should have monkey harpo' do - @it.exists?(:harpo).should == true + it 'has monkey harpo' do + @it.exists?(:harpo).should be true end - it 'should have monkey groucho' do - @it.exists?(:groucho).should == true + it 'has monkey groucho' do + @it.exists?(:groucho).should be true end - it 'should have monkey chico' do - @it.exists?(:chico).should == true + it 'has monkey chico' do + @it.exists?(:chico).should be true end end context 'methods' do it "'get' should raise an exception if invalid argument type is sent" do @@ -57,11 +57,11 @@ @it.add(MonkeyFactory.create(:chico)) }.should raise_exception MonkeyEngine::Exceptions::UniqueObjectException end it "'any_alive?' should return objects that are alive" do - @it.any_alive?.should == true + @it.any_alive?.should be true end end context 'clean up' do it 'no monkeys should be alive if killed by the service' do @@ -69,11 +69,11 @@ @it.kill_all! # Give them a little bit to finish. @it.join_all(10) - @it.any_alive?.should == false + @it.any_alive?.should be false end it 'kill_all! should return all monkeys killed' do monkey_service = MonkeyEngine::MonkeyService.instance @@ -85,9 +85,9 @@ killed_monkeys = monkey_service.kill_all! monkey_service.join_all(10) - (monkeys == killed_monkeys).should == true + (monkeys == killed_monkeys).should be true end end end