Sha256: d1b3376e33321825f4256a108511304a63f87293c973ea014eddb77e18a924e9

Contents?: true

Size: 986 Bytes

Versions: 9

Compression:

Stored size: 986 Bytes

Contents

if ENV['BUILDER'] == 'travis'
  require "codeclimate-test-reporter"
  CodeClimate::TestReporter.start
else
  require 'simplecov'
  SimpleCov.start do
    add_filter '/spec/'
  end
end

require 'active_record'
require 'sql_query'
require 'pry'

SqlQuery.configure do |config|
  config.path = '/spec/sql_queries'
end

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  connection = if ENV['BUILDER'] == 'travis'
                 "postgres://postgres@localhost/travis_ci_test"
               else
                 "postgres://sqlquery:sqlquery@localhost/sqlquery"
               end

  ActiveRecord::Base.establish_connection(connection)

  ActiveRecord::Base.connection.execute(
    "CREATE TABLE IF NOT EXISTS players (email text);"
  )

  config.order = :random
  Kernel.srand config.seed
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sql_query-0.6.0 spec/spec_helper.rb
sql_query-0.5.0 spec/spec_helper.rb
sql_query-0.4.0 spec/spec_helper.rb
sql_query-0.3.0 spec/spec_helper.rb
sql_query-0.2.1 spec/spec_helper.rb
sql_query-0.2.0 spec/spec_helper.rb
sql_query-0.1.0 spec/spec_helper.rb
sql_query-0.0.2 spec/spec_helper.rb
sql_query-0.0.1 spec/spec_helper.rb