Sha256: c5127df5edd2b0ea2a258ef4ed6cd84e9868294432977b78d32b675ca7aa4ca9
Contents?: true
Size: 1.81 KB
Versions: 2
Compression:
Stored size: 1.81 KB
Contents
describe "figaro heroku:set" do before do create_directory("example") cd("example") write_file("config/application.yml", "foo: bar") end it "sends Figaro configuration to Heroku" do run_command_and_stop("figaro heroku:set") command = commands.last expect(command.name).to eq("heroku") expect(command.args).to eq(["config:set", "foo=bar"]) end it "respects path" do write_file("env.yml", "foo: bar") run_command_and_stop("figaro heroku:set -p env.yml") command = commands.last expect(command.name).to eq("heroku") expect(command.args).to eq(["config:set", "foo=bar"]) end it "respects environment" do overwrite_file("config/application.yml", <<-EOF) foo: bar test: foo: baz EOF run_command_and_stop("figaro heroku:set -e test") command = commands.last expect(command.name).to eq("heroku") expect(command.args).to eq(["config:set", "foo=baz"]) end it "targets a specific Heroku app" do run_command_and_stop("figaro heroku:set -a foo-bar-app") command = commands.last expect(command.name).to eq("heroku") expect(command.args.shift).to eq("config:set") expect(command.args).to match_array(["foo=bar", "--app=foo-bar-app"]) end it "targets a specific Heroku git remote" do run_command_and_stop("figaro heroku:set -r production") command = commands.last expect(command.name).to eq("heroku") expect(command.args.shift).to eq("config:set") expect(command.args).to match_array(["foo=bar", "--remote=production"]) end it "handles values with special characters" do overwrite_file("config/application.yml", "foo: bar baz") run_command_and_stop("figaro heroku:set") command = commands.last expect(command.name).to eq("heroku") expect(command.args).to eq(["config:set", "foo=bar baz"]) end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
daqing_figaro-1.2.1 | spec/figaro/cli/heroku_set_spec.rb |
figaro-1.2.0 | spec/figaro/cli/heroku_set_spec.rb |