spec/monkey_factory_spec.rb in MonkeyEngine-1.1.0 vs spec/monkey_factory_spec.rb in MonkeyEngine-2.0.0
- old
+ new
@@ -1,23 +1,23 @@
+# 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 = MonkeyFactory.create(:harpo)
monkey.nil?.should == false
monkey.is_a?(Monkey).should == true
end
it 'should not instantiate an object without using the factory' do
- lambda { Monkey.new :groucho }.should raise_error NoMethodError
+ -> { Monkey.new :groucho }.should raise_error NoMethodError
end
end
-end
\ No newline at end of file
+end