spec/groupdocs/api/helpers/actions_helper_spec.rb in groupdocs-0.2.11 vs spec/groupdocs/api/helpers/actions_helper_spec.rb in groupdocs-0.3.0

- old
+ new

@@ -8,27 +8,10 @@ let(:actions) do %w(convert combine compress_zip compress_rar trace convert_body bind_data print import_annotations) end - describe 'ACTIONS' do - it 'contains hash of actions' do - described_class::ACTIONS.should == { - none: 0, - convert: 1, - combine: 2, - compress_zip: 4, - compress_rar: 8, - trace: 16, - convert_body: 32, - bind_data: 64, - print: 128, - import_annotations: 256, - } - end - end - describe '.convert_actions_to_byte' do it 'raises error if actions is not an array' do -> { subject.convert_actions_to_byte(:convert) }.should raise_error(ArgumentError) end @@ -47,19 +30,8 @@ it 'returns correct byte flag' do flag = subject.convert_actions_to_byte(actions) flag.should be_an(Integer) flag.should == 511 - end - end - - describe '#convert_byte_to_actions' do - it 'raises error if byte is not an integer' do - -> { subject.convert_byte_to_actions('byte') }.should raise_error(ArgumentError) - end - - - it 'returns correct array of actions' do - subject.convert_byte_to_actions(511).should =~ actions.map(&:to_sym) end end end