spec/rflow/configuration_spec.rb in rflow-1.0.1 vs spec/rflow/configuration_spec.rb in rflow-1.1.0

- old
+ new

@@ -3,34 +3,34 @@ class RFlow describe Configuration do describe '.add_available_data_type' do context 'if passed a data_serialization that is not avro' do - it "should throw an exception" do + it 'should throw an exception' do expect { Configuration.add_available_data_type('A', 'boom', 'schema') }.to raise_error( ArgumentError, "Data serialization_type must be 'avro' for 'A'") end - it "should not update the available_data_types" do + it 'should not update the available_data_types' do expect { Configuration.add_available_data_type('A', 'boom', 'schema') rescue nil }.not_to change { Configuration.available_data_types.size } end end end - describe "Data Extensions" do - describe ".add_available_data_extension" do + describe 'Data Extensions' do + describe '.add_available_data_extension' do context 'if passed a non-module data extension' do - it "should throw an exception" do + it 'should throw an exception' do expect { Configuration.add_available_data_extension('data_type', 'NOTAMODULE') - }.to raise_error(ArgumentError, "Invalid data extension NOTAMODULE for data_type. Only Ruby Modules allowed") + }.to raise_error(ArgumentError, 'Invalid data extension NOTAMODULE for data_type. Only Ruby Modules allowed') end end - context "if passed a valid Module as a data extension" do - it "should update the available_data_extensions" do + context 'if passed a valid Module as a data extension' do + it 'should update the available_data_extensions' do expect { Configuration.add_available_data_extension('data_type', Module.new) }.to change { Configuration.available_data_extensions['data_type'].size }.by(1) end end