Sha256: dcf7fa3f9e3fe32f19f71024a32e36b77118fa16964f98ad73d31477787071a1
Contents?: true
Size: 1.37 KB
Versions: 26
Compression:
Stored size: 1.37 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' require 'pry' require 'pry-nav' 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
26 entries across 26 versions & 1 rubygems