aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands/server_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/commands/server_test.rb')
-rw-r--r--railties/test/commands/server_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index ba688f1e9e..7a063aeddf 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -44,6 +44,22 @@ class Rails::ServerTest < ActiveSupport::TestCase
end
end
+ def test_caching_without_option
+ args = []
+ options = Rails::Server::Options.new.parse!(args)
+ assert_equal nil, options[:caching]
+ end
+
+ def test_caching_with_option
+ args = ["--dev-caching"]
+ options = Rails::Server::Options.new.parse!(args)
+ assert_equal true, options[:caching]
+
+ args = ["--no-dev-caching"]
+ options = Rails::Server::Options.new.parse!(args)
+ assert_equal false, options[:caching]
+ end
+
def test_log_stdout
with_rack_env nil do
with_rails_env nil do