diff options
author | Jacek Becela <jacek.becela@gmail.com> | 2008-05-28 21:30:44 +0200 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-06-08 13:05:45 -0400 |
commit | 86a042ddd9dba8f62e7328c7258a798aef73d57f (patch) | |
tree | bedcafcbc1a37ba1ea6d50956febf32bc2611d92 /railties/test/fixtures/plugins | |
parent | b336ce9e062e4de0d20aa359b08e86fe83b6dd89 (diff) | |
download | rails-86a042ddd9dba8f62e7328c7258a798aef73d57f.tar.gz rails-86a042ddd9dba8f62e7328c7258a798aef73d57f.tar.bz2 rails-86a042ddd9dba8f62e7328c7258a798aef73d57f.zip |
Make plugins initialize also from rails/init.rb to ensure consistency with gems used as plugins
[#272 state:resolved]
Diffstat (limited to 'railties/test/fixtures/plugins')
3 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/fixtures/plugins/default/gemlike/init.rb b/railties/test/fixtures/plugins/default/gemlike/init.rb new file mode 100644 index 0000000000..6a771b5b68 --- /dev/null +++ b/railties/test/fixtures/plugins/default/gemlike/init.rb @@ -0,0 +1 @@ +raise 'This init.rb should not be evaluated because rails/init.rb exists' diff --git a/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb b/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb new file mode 100644 index 0000000000..2088103e45 --- /dev/null +++ b/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb @@ -0,0 +1,2 @@ +module Gemlike +end
\ No newline at end of file diff --git a/railties/test/fixtures/plugins/default/gemlike/rails/init.rb b/railties/test/fixtures/plugins/default/gemlike/rails/init.rb new file mode 100644 index 0000000000..171a293eb3 --- /dev/null +++ b/railties/test/fixtures/plugins/default/gemlike/rails/init.rb @@ -0,0 +1,7 @@ +# I have access to my directory and the Rails config. +raise 'directory expected but undefined in init.rb' unless defined? directory +raise 'config expected but undefined in init.rb' unless defined? config + +# My lib/ dir must be in the load path. +require 'gemlike' +raise 'missing mixin from my lib/ dir' unless defined? Gemlike |