quickbooks_web_connector 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,8 @@
2
2
  ENV["RAILS_ENV"] = "test"
3
3
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
4
 
5
+ require 'rails-controller-testing'
6
+
5
7
  $dir = File.dirname(File.expand_path(__FILE__))
6
8
 
7
9
  require 'rspec/rails'
@@ -11,16 +13,14 @@ require 'rexml/document'
11
13
  # in spec/support and it's subdirectories
12
14
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
15
 
14
- # Rails 5 defines a custom params parser for XML that expects a 'hash' key as the root, but our XML doesn't match that
15
- if Rails.version >= '5.0.0'
16
- ActionController::TestRequest.prepend(Module.new do
17
- def initialize(*)
18
- super
16
+ # Rails defines a custom params parser for XML that expects a 'hash' key as the root, but our XML doesn't match that
17
+ ActionController::TestRequest.prepend(Module.new do
18
+ def initialize(*)
19
+ super
19
20
 
20
- @custom_param_parsers[:xml] = lambda { |raw_post| Hash.from_xml(raw_post) }
21
- end
22
- end)
23
- end
21
+ @custom_param_parsers[:xml] = lambda { |raw_post| Hash.from_xml(raw_post) }
22
+ end
23
+ end)
24
24
 
25
25
  RSpec.configure do |config|
26
26
  config.expect_with :rspec do |c|
Binary file