spec/runner_spec.rb in schema_dev-3.13.0 vs spec/runner_spec.rb in schema_dev-3.13.1
- old
+ new
@@ -3,20 +3,20 @@
require 'pathname'
describe SchemaDev::Runner do
it "creates gemfiles" do
- config = get_config(ruby: "2.1.3", activerecord: "4.0", db: "sqlite3")
+ config = get_config(ruby: "2.1.3", activerecord: "5.2", db: "sqlite3")
runner = SchemaDev::Runner.new(config)
in_tmpdir do
expect{ runner.gemfiles }.to output("* Updated gemfiles\n").to_stdout
expect(Pathname.new("gemfiles")).to be_directory
end
end
it "creates travis" do
- config = get_config(ruby: "2.1.3", activerecord: "4.0", db: "sqlite3")
+ config = get_config(ruby: "2.1.3", activerecord: "5.2", 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
@@ -52,27 +52,27 @@
end
original_popen2e.call(cmd, &block)
}
end
- let(:config) { get_config(ruby: RUBY_VERSION, activerecord: "4.0", db: %W[sqlite3 postgresql]) }
+ let(:config) { get_config(ruby: RUBY_VERSION, activerecord: "5.2", db: %W[sqlite3 postgresql]) }
let(:runner) { SchemaDev::Runner.new(config) }
let(:expected_output) { <<ENDOUTPUT.strip }
* Updated .travis.yml
* Updated gemfiles
-*** ruby #{RUBY_VERSION} - activerecord 4.0 - db sqlite3 [1 of 2]
+*** ruby #{RUBY_VERSION} - activerecord 5.2 - db sqlite3 [1 of 2]
-* /usr/bin/env BUNDLE_GEMFILE=gemfiles/activerecord-4.0/Gemfile.sqlite3 #{selection_command} %{cmd}
+* /usr/bin/env BUNDLE_GEMFILE=gemfiles/activerecord-5.2/Gemfile.sqlite3 #{selection_command} %{cmd}
%{output}
-*** ruby #{RUBY_VERSION} - activerecord 4.0 - db postgresql [2 of 2]
+*** ruby #{RUBY_VERSION} - activerecord 5.2 - db postgresql [2 of 2]
-* /usr/bin/env BUNDLE_GEMFILE=gemfiles/activerecord-4.0/Gemfile.postgresql #{selection_command} %{cmd}
+* /usr/bin/env BUNDLE_GEMFILE=gemfiles/activerecord-5.2/Gemfile.postgresql #{selection_command} %{cmd}
%{output}
ENDOUTPUT
it "runs successfully" do
in_tmpdir do
@@ -83,22 +83,22 @@
it "reports error exits" do
in_tmpdir do
expect{ runner.run("false") }.to output(expected_output % {cmd: 'false', output: nil} + <<-ENDERR).to_stdout
*** 2 failures:
-\truby #{RUBY_VERSION} - activerecord 4.0 - db sqlite3
-\truby #{RUBY_VERSION} - activerecord 4.0 - db postgresql
+\truby #{RUBY_VERSION} - activerecord 5.2 - db sqlite3
+\truby #{RUBY_VERSION} - activerecord 5.2 - db postgresql
ENDERR
end
end
it "reports error messages" do
in_tmpdir do
expect{ runner.run("echo", "LoadError") }.to output(expected_output % {cmd: 'echo LoadError', output: "LoadError\n"} + <<-ENDERR).to_stdout
*** 2 failures:
-\truby #{RUBY_VERSION} - activerecord 4.0 - db sqlite3
-\truby #{RUBY_VERSION} - activerecord 4.0 - db postgresql
+\truby #{RUBY_VERSION} - activerecord 5.2 - db sqlite3
+\truby #{RUBY_VERSION} - activerecord 5.2 - db postgresql
ENDERR
end
end
end
end