Skip to content

Commit

Permalink
split expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
niku committed Apr 20, 2012
1 parent 8a1a4f7 commit 5d1efe1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/apn_on_rails/app/models/apn/group_notification_spec.rb
Expand Up @@ -55,8 +55,12 @@
let(:payload_part_header_length) { 2 } # Payload length(2 byte) let(:payload_part_header_length) { 2 } # Payload length(2 byte)
let(:boundaly_between_binary_and_payload) { token_part_header_length + device_token_binary_size + payload_part_header_length } let(:boundaly_between_binary_and_payload) { token_part_header_length + device_token_binary_size + payload_part_header_length }


it do it 'should eq eqch binary part' do
subject.should == fixture_value('message_for_sending.bin') subject[0...boundaly_between_binary_and_payload].should == fixture_value('message_for_sending.bin')[0...boundaly_between_binary_and_payload]
end

it 'should be same meaning as each payload part' do
subject[boundaly_between_binary_and_payload..-1].should be_same_meaning_as fixture_value('message_for_sending.bin')[boundaly_between_binary_and_payload..-1]
end end
end end


Expand Down

0 comments on commit 5d1efe1

Please sign in to comment.