diff options
-rw-r--r-- | core/config/initializers/load_config.rb (renamed from config/initializers/load_config.rb) | 0 | ||||
-rw-r--r-- | help/app/models/ticket.rb | 3 | ||||
-rw-r--r-- | users/app/models/user.rb | 3 | ||||
-rw-r--r-- | users/test/integration/api/rack_test.rb | 12 |
4 files changed, 16 insertions, 2 deletions
diff --git a/config/initializers/load_config.rb b/core/config/initializers/load_config.rb index b2b0318..b2b0318 100644 --- a/config/initializers/load_config.rb +++ b/core/config/initializers/load_config.rb diff --git a/help/app/models/ticket.rb b/help/app/models/ticket.rb index a456fe5..738487a 100644 --- a/help/app/models/ticket.rb +++ b/help/app/models/ticket.rb @@ -47,7 +47,8 @@ class Ticket < CouchRest::Model::Base view :by_is_open_and_created_at view :by_is_open_and_updated_at - load_views(Rails.root.join('help', 'app', 'designs', 'ticket')) + own_path = Pathname.new(File.dirname(__FILE__)) + load_views(own_path.join('..', 'designs', 'ticket')) end validates :title, :presence => true diff --git a/users/app/models/user.rb b/users/app/models/user.rb index c9b367f..62c5054 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -47,7 +47,8 @@ class User < CouchRest::Model::Base timestamps! design do - load_views(Rails.root.join('users', 'app', 'designs', 'user')) + own_path = Pathname.new(File.dirname(__FILE__)) + load_views(own_path.join('..', 'designs', 'user')) view :by_login view :by_created_at end diff --git a/users/test/integration/api/rack_test.rb b/users/test/integration/api/rack_test.rb new file mode 100644 index 0000000..da960f2 --- /dev/null +++ b/users/test/integration/api/rack_test.rb @@ -0,0 +1,12 @@ +CONFIG_RU = (Rails.root + 'config.ru').to_s +OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first + +class RackTest < ActiveSupport::TestCase + include Rack::Test::Methods + include Warden::Test::Helpers + include LeapWebCore::AssertResponses + + def app + OUTER_APP + end +end |