spec/support/rails5/app.rb in influxdb-rails-1.0.1.beta2 vs spec/support/rails5/app.rb in influxdb-rails-1.0.1.beta3

- old
+ new

@@ -18,13 +18,10 @@ app.routes.draw do resources :metrics, only: %i[index show] resources :exceptions, only: :index end -InfluxDB::Rails.configure do |config| -end - ENV["DATABASE_URL"] = "sqlite3::memory:" ActiveRecord::Schema.define do create_table :metrics, force: true do |t| t.string :name @@ -50,10 +47,12 @@ end end end class Metric < ActiveRecord::Base; end + class ApplicationController < ActionController::Base; end + class MetricsController < ApplicationController prepend_view_path File.join(__dir__, "..", "views") before_action do InfluxDB::Rails.current.values = { additional_value: :value }