Sha256: 3c810661a0c7bb8eac7836ae6080ef17340313a46b6ece0415158965bd3252f4
Contents?: true
Size: 1.13 KB
Versions: 8
Compression:
Stored size: 1.13 KB
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" desc "Run RSpec code examples (skip postgres required ones)" RSpec::Core::RakeTask.new(:spec) # In CI, as part of the .rspec_ci, load a helper that sets the configuration # setting to allow the postgres specs to run. desc "Run RSpec code examples (assumes ci dependencies)" RSpec::Core::RakeTask.new("spec:ci") do |t| # Temporarily disable the PG runner on CI # was: t.rspec_opts = "--options #{File.expand_path(".rspec_ci", __dir__)}" warn "\e[33;1mWARN: PostgresRunner specs are temporarily disabled on CI\e[0m" if ENV["CI"] t.rspec_opts = "--options #{File.expand_path(".rspec", __dir__)}" end desc "Run RSpec code examples (with local postgres dependencies)" RSpec::Core::RakeTask.new("spec:dev") do |t| # Load the PostgresRunner helper to facilitate a clean postgres environment # for testing locally (not necessary for CI), and enables the postgres test # via the helper. pg_runner = File.join("spec", "postgres_runner_helper.rb") t.rspec_opts = "-r #{File.expand_path(pg_runner, __dir__)}" end task :default do Rake::Task["spec#{':ci' if ENV['CI']}"].invoke end
Version data entries
8 entries across 8 versions & 1 rubygems