From 8a0f4564432bef9dde815dd6b768d088cfad16ed Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Wed, 21 Oct 2009 15:45:11 -0700 Subject: Refactored railties' isolation tests to be able to run script/* scripts. --- railties/test/plugins/vendored_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 railties/test/plugins/vendored_test.rb (limited to 'railties/test/plugins/vendored_test.rb') diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb new file mode 100644 index 0000000000..71de542ff7 --- /dev/null +++ b/railties/test/plugins/vendored_test.rb @@ -0,0 +1,19 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class PluginTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + end + + test "generates the plugin" do + script "generate plugin my_plugin" + File.open("#{app_path}/vendor/plugins/my_plugin/init.rb", 'w') do |f| + f.puts "OMG = 'hello'" + end + require "#{app_path}/config/environment" + end + end +end \ No newline at end of file -- cgit v1.2.3