spec/travis_spec.rb in schema_dev-3.12.0 vs spec/travis_spec.rb in schema_dev-3.12.1

- old
+ new

@@ -48,9 +48,37 @@ env: POSTGRESQL_DB_USER=postgres ENDTRAVIS end end + context 'when only using postgresql and not overriding the version' do + it "creates travis file using the default PG version" do + config = get_config(ruby: %W[2.4.0], + activerecord: %W[4.1], + db: %W[postgresql]) + in_tmpdir do + SchemaDev::Travis.update(config) + expect(Pathname.new(".travis.yml").read).to eq <<ENDTRAVIS +# This file was auto-generated by the schema_dev tool, based on the data in +# ./schema_dev.yml +# Please do not edit this file; any changes will be overwritten next time +# schema_dev gets run. +--- +rvm: +- 2.4.0 +gemfile: +- gemfiles/activerecord-4.1/Gemfile.postgresql +env: POSTGRESQL_DB_USER=postgres +addons: + postgresql: '9.4' +before_script: bundle exec rake create_databases +after_script: bundle exec rake drop_databases +script: bundle exec rake travis +ENDTRAVIS + end + end + end + context 'when specifying a single postgresql version' do it "creates travis file using that as the PG version" do config = get_config(ruby: %W[2.4.0], activerecord: %W[4.1], db: %W[mysql2 postgresql],