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

- old
+ new

@@ -1,23 +1,15 @@ # frozen_string_literal: true require 'MonkeyFactory' describe 'MonkeyFactory' do - before(:all) do - end - - after(:all) do - end - context 'create' do - it 'should instantiate an object from the factory' do - monkey = MonkeyFactory.create(:harpo) - monkey.nil?.should == false - monkey.is_a?(Monkey).should == true + it 'instantiates an object from the factory' do + MonkeyFactory.create(:harpo).is_a?(Monkey).should be true end - it 'should not instantiate an object without using the factory' do + it 'does not instantiate an object without using the factory' do -> { Monkey.new :groucho }.should raise_error NoMethodError end end end