Skip to content

Commit

Permalink
Use rspec for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mantaskujalis committed Jul 25, 2024
1 parent 96303c4 commit 452dee9
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 440 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/pkg/

.rspec_status
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format documentation
--color
--require spec_helper
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gemspec

group :test do
gem 'mock_redis'
gem 'rspec'
end
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ PATH
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.1)
minitest (5.15.0)
mock_redis (0.30.0)
ruby2_keywords
rake (12.3.3)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
ruby2_keywords (0.0.5)

PLATFORMS
Expand All @@ -21,6 +35,7 @@ DEPENDENCIES
minitest (~> 5.0)
mock_redis
rake (~> 12.0)
rspec

BUNDLED WITH
2.2.33
13 changes: 7 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rspec/core/rake_task'

Rake::TestTask.new(:test) do |task|
task.test_files = FileList['test/**/*_test.rb']
task.libs += %w(test lib)
end
RSpec::Core::RakeTask.new(:spec)

require 'rubocop/rake_task'

RuboCop::RakeTask.new

task default: :test
task default: %i[spec rubocop]

task :version do |t|
puts ChainedJob::VERSION
Expand Down
16 changes: 16 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

require 'chained_job'

RSpec.configure do |config|
config.example_status_persistence_file_path = '.rspec_status'
config.disable_monkey_patching!

config.expect_with :rspec do |c|
c.syntax = :expect
end

config.mock_with :rspec do |c|
c.allow_message_expectations_on_nil = true
end
end
79 changes: 0 additions & 79 deletions test/chained_job/clean_up_queue_test.rb

This file was deleted.

57 changes: 0 additions & 57 deletions test/chained_job/config_test.rb

This file was deleted.

25 changes: 0 additions & 25 deletions test/chained_job/helpers_test.rb

This file was deleted.

141 changes: 0 additions & 141 deletions test/chained_job/process_test.rb

This file was deleted.

Loading

0 comments on commit 452dee9

Please sign in to comment.