require 'schema_dev/runner' describe SchemaDev::Runner do it "creates gemfiles" do config = get_config(ruby: "2.1.3", rails: "4.0", db: "sqlite3") runner = SchemaDev::Runner.new(config) in_tmpdir do expect{ runner.gemfiles }.to output("* Created gemfiles\n").to_stdout expect(Pathname.new("gemfiles")).to be_directory end end it "creates travis" do config = get_config(ruby: "2.1.3", rails: "4.0", db: "sqlite3") runner = SchemaDev::Runner.new(config) in_tmpdir do expect{ runner.travis }.to output("* Updated .travis.yml\n").to_stdout expect(Pathname.new(".travis.yml")).to be_file end end describe "matrix" do let(:config) { get_config(ruby: RUBY_VERSION, rails: "4.0", db: %W[sqlite3 postgresql]) } let(:runner) { SchemaDev::Runner.new(config) } let(:expected_output) { <