forked from iain/fake_sqs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
31 lines (23 loc) · 730 Bytes
/
Rakefile
File metadata and controls
31 lines (23 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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