test/unit/config_tests.rb in assert-2.19.2 vs test/unit/config_tests.rb in assert-2.19.3
- old
+ new
@@ -10,18 +10,18 @@
require "assert/runner"
class Assert::Config
class UnitTests < Assert::Context
desc "Assert::Config"
- subject { unit_class }
+ subject{ unit_class }
- let(:unit_class) { Assert::Config }
+ let(:unit_class){ Assert::Config }
end
class InitTests < UnitTests
desc "when init"
- subject { unit_class.new }
+ subject{ unit_class.new }
should have_imeths :view, :suite, :runner
should have_imeths :test_dir, :test_helper, :test_file_suffixes
should have_imeths :changed_proc, :pp_proc, :use_diff_proc, :run_diff_proc
should have_imeths :runner_seed, :changed_only, :changed_ref, :single_test
@@ -63,30 +63,30 @@
assert_that(subject.debug).is_false
end
should "apply settings given from a hash" do
assert subject.halt_on_fail
- subject.apply(:halt_on_fail => false)
+ subject.apply(halt_on_fail: false)
assert_that(subject.halt_on_fail).is_false
assert_that(Assert::Config.new.halt_on_fail).is_true
- assert_that(Assert::Config.new(:halt_on_fail => false).halt_on_fail).is_false
+ assert_that(Assert::Config.new(halt_on_fail: false).halt_on_fail).is_false
end
should "know if it is in single test mode" do
assert_that(subject.single_test?).is_false
- subject.apply(:single_test => Factory.string)
+ subject.apply(single_test: Factory.string)
assert_that(subject.single_test?).is_true
end
should "know its single test file line" do
exp = Assert::FileLine.parse(File.expand_path("", Dir.pwd))
assert_that(subject.single_test_file_line).equals(exp)
file_line_path = "#{Factory.path}_tests.rb:#{Factory.integer}"
- subject.apply(:single_test => file_line_path)
+ subject.apply(single_test: file_line_path)
exp = Assert::FileLine.parse(File.expand_path(file_line_path, Dir.pwd))
assert_that(subject.single_test_file_line).equals(exp)
end
@@ -94,10 +94,11 @@
exp = Assert::FileLine.parse(File.expand_path("", Dir.pwd)).file
assert_that(subject.single_test_file_path).equals(exp)
path = "#{Factory.path}_tests.rb"
file_line_path = "#{path}:#{Factory.integer}"
- subject.apply(:single_test => file_line_path)
- assert_that(subject.single_test_file_path).equals(File.expand_path(path, Dir.pwd))
+ subject.apply(single_test: file_line_path)
+ assert_that(subject.single_test_file_path)
+ .equals(File.expand_path(path, Dir.pwd))
end
end
end