Sha256: 6a34c14a243758c842d811495edea69fecd391678f2615c98c7c775d0c41de34

Contents?: true

Size: 1.33 KB

Versions: 33

Compression:

Stored size: 1.33 KB

Contents

ENV["RAILS_ENV"] ||= 'test'
require "canvas_sync"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "bundler/setup"
require 'rspec/rails'
require 'spec_helper'
require 'factory_girl_rails'
require 'timecop'
require 'webmock/rspec'
require 'support/fake_canvas'
require 'shoulda/matchers'

ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.use_transactional_fixtures = true
  config.infer_spec_type_from_file_location!
  config.filter_rails_from_backtrace!

  # Enable flags like --only-failures and --next-failure
  config.example_status_persistence_file_path = ".rspec_status"

  # Disable RSpec exposing methods globally on `Module` and `main`
  config.disable_monkey_patching!

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  config.before(:each) do
    stub_request(:any, /test.instructure.com/).to_rack(FakeCanvas)
  end
end

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :rspec
    with.library :rails
  end
end

def open_canvas_fixture(name)
  data = File.open(File.dirname(__FILE__) + '/support/fixtures/canvas_responses/' + name + '.json', 'rb').read
  JSON.parse(data)
end

def canvas_sync_client
  Bearcat::Client.new(token: 'cool-token', prefix: 'http://test.instructure.com')
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
canvas_sync-0.3.22 spec/spec_helper.rb
canvas_sync-0.3.21 spec/spec_helper.rb
canvas_sync-0.3.20 spec/spec_helper.rb
canvas_sync-0.3.19 spec/spec_helper.rb
canvas_sync-0.3.18 spec/spec_helper.rb
canvas_sync-0.3.17 spec/spec_helper.rb
canvas_sync-0.3.16 spec/spec_helper.rb
canvas_sync-0.3.15 spec/spec_helper.rb
canvas_sync-0.3.14 spec/spec_helper.rb
canvas_sync-0.3.13 spec/spec_helper.rb
canvas_sync-0.3.12 spec/spec_helper.rb
canvas_sync-0.3.11 spec/spec_helper.rb
canvas_sync-0.3.10 spec/spec_helper.rb
canvas_sync-0.3.9 spec/spec_helper.rb
canvas_sync-0.3.8 spec/spec_helper.rb
canvas_sync-0.3.7 spec/spec_helper.rb
canvas_sync-0.3.6 spec/spec_helper.rb
canvas_sync-0.3.5 spec/spec_helper.rb
canvas_sync-0.3.3 spec/spec_helper.rb
canvas_sync-0.3.2 spec/spec_helper.rb