Skip to content

Commit

Permalink
Resolve test deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlaprade committed Mar 14, 2018
1 parent e8a88eb commit 7162aaa
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/cangaroo/endpoint_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def handle_request
def ensure_json_request
return if request.headers['Content-Type'] == 'application/json'

render nothing: true, status: 406
head 406
end

def key
Expand Down
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
require "rubygems"
require "bundler/setup"

load Gem.bin_path("factory_girl_rails", "setup")
load Gem.bin_path("factory_bot_rails", "setup")
2 changes: 1 addition & 1 deletion cangaroo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'appraisal'
s.add_development_dependency 'codeclimate-test-reporter'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'factory_girl_rails'
s.add_development_dependency 'factory_bot_rails'
s.add_development_dependency 'pry-byebug'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec-rails'
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/cangaroo_connections.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'securerandom'

FactoryGirl.define do
FactoryBot.define do
factory :cangaroo_connection, class: 'Cangaroo::Connection' do
name :store
url 'www.store.com'
Expand Down
1 change: 1 addition & 0 deletions spec/jobs/cangaroo/poll_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class FakePollJob < Cangaroo::PollJob
allow_any_instance_of(Cangaroo::Webhook::Client)
.to receive(:post)
.and_return(parse_fixture('json_payload_ok.json'))
allow_any_instance_of(Cangaroo::Webhook::Client).to receive(:post).and_return(parse_fixture('json_payload_ok.json'))

allow(Cangaroo::PerformFlow).to receive(:call).and_return(double(success?: false,
message: 'bad failure'))
Expand Down
4 changes: 2 additions & 2 deletions spec/support/factory_girl.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'factory_girl_rails'
require 'factory_bot_rails'

RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.include FactoryBot::Syntax::Methods
end

0 comments on commit 7162aaa

Please sign in to comment.