Sha256: 4d72bcabda2e6f89f36e814a09d8e87670a9c4ebfcb84bc95c1ee97d19b66e0c

Contents?: true

Size: 909 Bytes

Versions: 9

Compression:

Stored size: 909 Bytes

Contents

%w(auth authentication authorization).each do |library_name|
  path = File.expand_path("../../#{library_name}/lib", __FILE__)
  $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
end

ENV["RACK_ENV"] = "test"
ENV["RAILS_ENV"] = "test"

require "rspec"
require "awesome_print"
Dir.glob("./spec/support/**/*.rb").sort.each { |path| load path }

require "simple/sql"

unless ENV["USE_ACTIVE_RECORD"]
  Simple::SQL.connect!
  Simple::SQL.ask "DELETE FROM users"
end

SQL = Simple::SQL
USER_COUNT = 2

ActiveRecord::Base.logger.level = Logger::INFO

RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.filter_run focus: (ENV["CI"] != "true")
  config.expect_with(:rspec) { |c| c.syntax = :expect }
  config.order = "random"
  config.around(:each) do |example|
    Simple::SQL.ask "DELETE FROM users"
    Simple::SQL.ask "DELETE FROM unique_users"
    example.run
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple-sql-0.4.3 spec/spec_helper.rb
simple-sql-0.4.2 spec/spec_helper.rb
simple-sql-0.4.1 spec/spec_helper.rb
simple-sql-0.4.0 spec/spec_helper.rb
simple-sql-0.3.7 spec/spec_helper.rb
simple-sql-0.3.6 spec/spec_helper.rb
simple-sql-0.3.5 spec/spec_helper.rb
simple-sql-0.3.4 spec/spec_helper.rb
simple-sql-0.3.3 spec/spec_helper.rb