Skip to content

Commit

Permalink
Add tests for rails 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillplatonov committed May 26, 2017
1 parent 2d6c409 commit 99c98e0
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ if RUBY_VERSION >= "2.2.0"
gem 'rails', '~> 5.0.3'
gem 'rails-controller-testing'
end

appraise 'rails51' do
gem 'rails', '~> 5.1.1'
gem 'rails-controller-testing'
end
end
16 changes: 16 additions & 0 deletions gemfiles/rails51.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "uglifier"
gem "sqlite3"
gem "dotenv-rails"
gem "minitest-spec-rails"
gem "coveralls", :require => false
gem "redcard"
gem "mocha", :require => false
gem "rails", "~> 5.1.1"
gem "rails-controller-testing"

gemspec :path => "../"
225 changes: 225 additions & 0 deletions gemfiles/rails51.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
PATH
remote: ..
specs:
resque-web (0.0.11)
coffee-rails
font-awesome-sass
jquery-rails
resque
sass-rails
twitter-bootstrap-rails

GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.1)
actionpack (= 5.1.1)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.1)
actionpack (= 5.1.1)
actionview (= 5.1.1)
activejob (= 5.1.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.1)
actionview (= 5.1.1)
activesupport (= 5.1.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.1)
activesupport (= 5.1.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.1)
activesupport (= 5.1.1)
globalid (>= 0.3.6)
activemodel (5.1.1)
activesupport (= 5.1.1)
activerecord (5.1.1)
activemodel (= 5.1.1)
activesupport (= 5.1.1)
arel (~> 8.0)
activesupport (5.1.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.2.0)
bundler
rake
thor (>= 0.14.0)
arel (8.0.0)
builder (3.2.3)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
commonjs (0.2.7)
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
docile (1.1.5)
dotenv (2.2.1)
dotenv-rails (2.2.1)
dotenv (= 2.2.1)
railties (>= 3.2, < 5.2)
erubi (1.6.0)
execjs (2.7.0)
font-awesome-sass (4.7.0)
sass (>= 3.2)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.1)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.1.0)
less (2.6.0)
commonjs (~> 0.2.7)
less-rails (2.8.0)
actionpack (>= 4.0)
less (~> 2.6.0)
sprockets (> 2, < 4)
tilt
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.5)
mime-types (>= 1.16, < 4)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.2)
minitest-spec-rails (5.4.0)
minitest (~> 5.0)
rails (>= 4.1)
mocha (1.2.1)
metaclass (~> 0.0.1)
mono_logger (1.1.0)
multi_json (1.12.1)
mustermann (1.0.0)
nio4r (2.0.0)
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
rack (2.0.3)
rack-protection (2.0.0)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.1.1)
actioncable (= 5.1.1)
actionmailer (= 5.1.1)
actionpack (= 5.1.1)
actionview (= 5.1.1)
activejob (= 5.1.1)
activemodel (= 5.1.1)
activerecord (= 5.1.1)
activesupport (= 5.1.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.1.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.1)
actionpack (= 5.1.1)
activesupport (= 5.1.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
redcard (1.1.0)
redis (3.3.3)
redis-namespace (1.5.3)
redis (~> 3.0, >= 3.0.4)
resque (1.27.4)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
sass (3.4.24)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.1)
sinatra (2.0.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.0)
tilt (~> 2.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
tins (1.14.0)
twitter-bootstrap-rails (4.0.0)
actionpack (~> 5.0, >= 5.0.1)
execjs (~> 2.7)
less-rails (~> 2.8, >= 2.8.0)
railties (~> 5.0, >= 5.0.1)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
vegas (0.1.11)
rack (>= 1.0.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby

DEPENDENCIES
appraisal
coveralls
dotenv-rails
minitest-spec-rails
mocha
rails (~> 5.1.1)
rails-controller-testing
redcard
resque-web!
sqlite3
uglifier

BUNDLED WITH
1.15.0
6 changes: 3 additions & 3 deletions test/functional/failures_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class FailuresControllerTest < ActionController::TestCase
describe "DELETE /failures/destroy_all" do
it "deletes all failures" do
Resque::Failure.expects(:clear).with('failed')
visit(:destroy_all, nil, :method => :delete)
visit(:destroy_all, {}, :method => :delete)
assert_redirected_to failures_path
end
end
Expand All @@ -51,7 +51,7 @@ class FailuresControllerTest < ActionController::TestCase
Resque::Failure.stubs(:requeue_and_remove).returns(true)
Resque::Failure.expects(:requeue_and_remove).with(0)
Resque::Failure.expects(:requeue_and_remove).with(1)
visit(:retry_all, nil, :method => :put)
visit(:retry_all, {}, :method => :put)
assert_redirected_to failures_path
end
it "retries all failures should also work case of pre 2.0 Resque" do
Expand All @@ -61,7 +61,7 @@ class FailuresControllerTest < ActionController::TestCase
Resque::Failure.expects(:remove).with(0)
Resque::Failure.expects(:requeue).with(1)
Resque::Failure.expects(:remove).with(1)
visit(:retry_all, nil, :method => :put)
visit(:retry_all, {}, :method => :put)
assert_redirected_to failures_path
end
it "retries all failures using requeue_queue if queue specified" do
Expand Down

0 comments on commit 99c98e0

Please sign in to comment.