Sha256: 1355ba1ecbbc910e841ae485f7a3659067ec99249682d95a5d47d9e335972ffb

Contents?: true

Size: 730 Bytes

Versions: 11

Compression:

Stored size: 730 Bytes

Contents

require "bundler/gem_tasks"

require "tempfile"
require 'rspec/core/rake_task'

namespace :spec do

  desc "Run only unit specs"
  RSpec::Core::RakeTask.new(:unit) do |t|
    t.pattern = "spec/unit"
  end

  desc "Run specs with in-memory database"
  RSpec::Core::RakeTask.new(:memory) do |t|
    ENV["SQS_DATABASE"] = ":memory:"
    t.pattern = "spec/acceptance"
  end

  desc "Run specs with file database"
  RSpec::Core::RakeTask.new(:file) do |t|
    file = Tempfile.new(["rspec-sqs", ".yml"], encoding: "utf-8")
    ENV["SQS_DATABASE"] = file.path
    t.pattern = "spec/acceptance"
  end

end

desc "Run spec suite with both in-memory and file"
task :spec => ["spec:unit", "spec:memory", "spec:file"]

task :default => :spec

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
fake_servicebus-0.0.2 Rakefile
fake_sqs-0.4.3 Rakefile
fake_sqs-0.4.2 Rakefile
fake_sqs-0.4.1 Rakefile
fake_sqs-0.4.0 Rakefile
fake_sqs-0.3.1 Rakefile
fake_sqs-0.3.0 Rakefile
fake_sqs-0.2.0 Rakefile
fake_sqs-0.1.0 Rakefile
fake_sqs-0.0.11 Rakefile
fake_sqs-0.0.10 Rakefile