Sha256: e29a618d6b03b2def4d2c07f0d41e5df16025af2e7093974ce8840386b54c19f
Contents?: true
Size: 712 Bytes
Versions: 13
Compression:
Stored size: 712 Bytes
Contents
require 'spec_helper' describe SimpleService::ValidatesCommandsNotEmpty do class DummyCommand < SimpleService::Command def call; true; end end context '#call' do it 'raises error when commands are not defined' do expect { SimpleService::ValidatesCommandsNotEmpty.new(provided_commands: nil).call }.to raise_error( SimpleService::OrganizerCommandsNotDefinedError, 'This Organizer class does not contain any command definitions' ) end it 'does not raise error when commands are defined' do expect { SimpleService::ValidatesCommandsNotEmpty.new(provided_commands: [DummyCommand]).call }.to_not raise_error end end end
Version data entries
13 entries across 13 versions & 1 rubygems