Sha256: df6aa47a350fbf3f262507a1e4bd3f8e8a75b14d919c70c58f9d5e87aa967669

Contents?: true

Size: 1.29 KB

Versions: 7

Compression:

Stored size: 1.29 KB

Contents

require File.expand_path("config/environment", ENV['RAILS_ROOT'] || File.expand_path("../internal", __FILE__))
require 'rspec'
require 'rspec/its'
require 'webmock/rspec'
require 'simplecov'
require 'vcr'

SimpleCov.start do
  add_filter "/spec/"
end

VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
  c.hook_into :webmock
  c.configure_rspec_metadata!
end

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end
end

module BrowserConfigHelper
  def url_options
    {
      protocol: 'http://',
      host: 'browse-everything.example.edu'
    }
  end

  def stub_configuration
    BrowseEverything.configure({
      "file_system" => {
        home: File.expand_path('../fixtures/file_system',__FILE__)
      },
      "box" => {
        client_id: "BoxClientId",
        client_secret: "BoxClientSecret"
      },
      "drop_box" => { 
        app_key: "DropBoxAppKey", 
        app_secret: "DropBoxAppSecret"
      },
      "google_drive" => {
        client_id: "GoogleClientId",
        client_secret: "GoogleClientSecret"
      },
      "sky_drive" => {
        client_id: "SkyDriveClientId",
        client_secret: "SkyDriveClientSecret"
      }
    })
  end

  def unstub_configuration
    BrowseEverything.configure(nil)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
browse-everything-0.6.3 spec/spec_helper.rb
browse-everything-0.6.2 spec/spec_helper.rb
browse-everything-0.6.1 spec/spec_helper.rb
browse-everything-0.6.0 spec/spec_helper.rb
browse-everything-0.5.2 spec/spec_helper.rb
browse-everything-0.5.1 spec/spec_helper.rb
browse-everything-0.5.0 spec/spec_helper.rb