Sha256: b6fb00ffdf3dfc0b1eb409fb83ddf8f5cf921f30fd2ae62d214a5f104a6201e1
Contents?: true
Size: 1.62 KB
Versions: 4
Compression:
Stored size: 1.62 KB
Contents
require 'spec_helper' describe "Gatling::Configuration" do describe "#reference_image_path" do before do begin # Check that rails exists, otherwise fake it for the test Module.const_get("Rails") rescue NameError module Rails def self.root "fake_rails_root" end end end end it "should default to <Rails.root>/spec/reference_images" do Gatling::Configuration.reference_image_path.should eql("fake_rails_root/spec/reference_images") end it "should be overrideable" do Gatling::Configuration.reference_image_path = "my custom path" Gatling::Configuration.reference_image_path.should eql("my custom path") end end describe '#trainer_toggle' do it 'should default to false' do Gatling::Configuration.trainer_toggle.should eql(false) end it 'can be toggled to true' do Gatling::Configuration.trainer_toggle = true Gatling::Configuration.trainer_toggle.should eql(true) end it 'toggeled using GATLING_TRAINER = false' do ENV['GATLING_TRAINER'] = 'false' Gatling::Configuration.trainer_toggle.should eql(false) end it 'toggeled using GATLING_TRAINER = true' do ENV['GATLING_TRAINER'] = 'true' Gatling::Configuration.trainer_toggle.should eql(true) end it 'toggeled using GATLING_TRAINER = nil' do ENV['GATLING_TRAINER'] = nil Gatling::Configuration.trainer_toggle.should eql(false) end after(:each) do Gatling::Configuration.trainer_toggle = false ENV['GATLING_TRAINER'] = nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gatling-1.0.6 | spec/configuration_spec.rb |
gatling-1.0.5 | spec/configuration_spec.rb |
gatling-1.0.4 | spec/configuration_spec.rb |
gatling-1.0.3 | spec/configuration_spec.rb |