Sha256: 68654518097b35c7e922b6333054628c76004def8283fb36dad9330b65ced3bb

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

require 'five_mobile_push'
require 'rspec'
# require 'webmock/rspec'
require 'yajl'
require 'uri'
require 'fabrication'

require 'ruby-debug'

RSpec.configure do |config|
  config.mock_with :rspec
end

def load_fixture(name)
  File.read File.expand_path("../fixtures/#{name}", __FILE__)
end

def build_request_body(client, data)
  data = data.merge(:api_token => client.api_token, :application_id => client.application_uid)
  String.new.tap do |body|
    data.each do |key,value|
      body << "#{key}=#{value}"
      body << "&" unless key == :application_id
    end
  end
end

# URI escape
def escape(s)
  URI.escape(s).gsub(',', '%2C')
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
five_mobile_push-0.4.7 spec/spec_helper.rb
five_mobile_push-0.4.6 spec/spec_helper.rb