Sha256: ce02c28fef6f53b3bc602a63f2c102bffe59ecf074fa9c80c2f3cb9bf61bd28e

Contents?: true

Size: 795 Bytes

Versions: 3

Compression:

Stored size: 795 Bytes

Contents

require 'rspec'
require 'rspec/expectations'
require 'yaml'
require 'arcgis-ruby'

module TestHelper
  def create_testing_group(options={})
    connection = Arcgis::Connection.new(ArcConfig.config["online"])
    connection.group.create(
      :title => "Ruby Testing Group",
      :description => "Group for Testing",
      :access => "org",
      :tags => "test,ruby")
  end

  def delete_testing_group
    unless @group.nil? || @group["group"].nil?
      @connection.group(@group["group"]["id"]).delete
    end
  end
end


RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
  config.include TestHelper
end


module ArcConfig
  class << self
    def config
      @config ||= YAML.load_file(File.dirname(__FILE__) + '/agol_config.yml')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
arcgis-ruby-0.0.3 spec/spec_helper.rb
arcgis-ruby-0.0.2 spec/spec_helper.rb
arcgis-ruby-0.0.0 spec/spec_helper.rb