Sha256: a72262173ba009fe42d786b71bb731d037977b93f2ab834c8cc69023e3116dea
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
def stub_setting_files defaults = <<-CONTENT one: default two: three: 3 four: "4" five: "default string" default_setting: 1 six: default: "default value" extra: "extra" deep_level: value: "even deeper level" seven: default: "seven" empty: default: autologin: format: int default: 7 flag_false: default: false CONTENT test = <<-CONTENT one: test two: three: 5 four: "6" five: "test string" six: extra: "recursively overriden" test_specific: "exist" CONTENT empty = <<-CONTENT CONTENT custom = <<-CONTENT seven: default: "seven from custom" CONTENT File.stub!(:exists?).and_return(true) File.stub!(:exists?).with("config/settings/environments/development.yml").and_return(false) File.stub!(:open).with("config/settings/default.yml").and_return(defaults) File.stub!(:open).with("config/settings/environments/test.yml").and_return(test) File.stub!(:open).with("config/settings/local/custom.yml").and_return(custom) File.stub!(:open).with("config/settings/local/empty.yml").and_return(empty) Dir.stub!(:glob).and_return(["config/settings/local/empty.yml", "config/settings/local/custom.yml"]) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mc-settings-0.1.2 | spec/support/settings_helper.rb |
mc-settings-0.1.1 | spec/support/settings_helper.rb |