spec/unit/configuration_spec.rb in influxdb-rails-0.1.11 vs spec/unit/configuration_spec.rb in influxdb-rails-0.1.12

- old
+ new

@@ -1,8 +1,8 @@ require 'spec_helper' -describe InfluxDB::Rails::Configuration do +RSpec.describe InfluxDB::Rails::Configuration do before do @configuration = InfluxDB::Rails::Configuration.new end describe "#ignore_user_agent?" do @@ -24,6 +24,22 @@ it "should be false if the ignored user agents list is inadvertently set to nil" do @configuration.ignored_user_agents = nil expect(@configuration.ignore_user_agent?("Googlebot/2.1")).to be_falsey end end + + describe "#retry" do + it "defaults to nil" do + InfluxDB::Rails.configure do |config| + end + expect(InfluxDB::Rails.configuration.retry).to be_nil + end + + it "can be updated" do + InfluxDB::Rails.configure do |config| + config.retry = 5 + end + expect(InfluxDB::Rails.configuration.retry).to eql(5) + end + end + end