Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

split expectation

  • Loading branch information...
commit 5d1efe16745bad69ad4314050ed66f115ca8e1eb 1 parent 8a1a4f7
@niku authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/apn_on_rails/app/models/apn/group_notification_spec.rb
View
8 spec/apn_on_rails/app/models/apn/group_notification_spec.rb
@@ -55,8 +55,12 @@
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 }
- it do
- subject.should == fixture_value('message_for_sending.bin')
+ it 'should eq eqch binary part' do
+ 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
Please sign in to comment.
Something went wrong with that request. Please try again.