responders 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,86 +0,0 @@
1
- require 'bundler/setup'
2
- require 'minitest/autorun'
3
- require 'mocha/setup'
4
-
5
- # Configure Rails
6
- ENV["RAILS_ENV"] = "test"
7
-
8
- require 'active_support'
9
- require 'active_model'
10
- require 'rails/engine'
11
- require 'rails/railtie'
12
-
13
- $:.unshift File.expand_path('../../lib', __FILE__)
14
- require 'responders'
15
-
16
- I18n.enforce_available_locales = true
17
- I18n.load_path << File.expand_path('../locales/en.yml', __FILE__)
18
- I18n.reload!
19
-
20
- Responders::Routes = ActionDispatch::Routing::RouteSet.new
21
- Responders::Routes.draw do
22
- resources :news
23
- get '/admin/:action', :controller => "admin/addresses"
24
- get '/:controller(/:action(/:id))'
25
- end
26
-
27
- class ApplicationController < ActionController::Base
28
- include Responders::Routes.url_helpers
29
-
30
- self.view_paths = File.join(File.dirname(__FILE__), 'views')
31
- respond_to :html, :xml
32
- end
33
-
34
- class ActiveSupport::TestCase
35
- setup do
36
- @routes = Responders::Routes
37
- end
38
- end
39
-
40
- module ActionDispatch
41
- class Flash
42
- class FlashHash
43
- def used_keys
44
- # Rails 3 || Rails 4
45
- @used || @discard
46
- end
47
- end
48
- end
49
- end
50
-
51
- class Model
52
- include ActiveModel::Conversion
53
- include ActiveModel::Validations
54
-
55
- attr_accessor :persisted, :updated_at
56
- alias :persisted? :persisted
57
-
58
- def persisted?
59
- @persisted
60
- end
61
-
62
- def to_xml(*args)
63
- "<xml />"
64
- end
65
-
66
- def initialize(updated_at=nil)
67
- @persisted = true
68
- self.updated_at = updated_at
69
- end
70
- end
71
-
72
- class Address < Model
73
- end
74
-
75
- class User < Model
76
- end
77
-
78
- class News < Model
79
- end
80
-
81
- module MyEngine
82
- class Business < Rails::Engine
83
- isolate_namespace MyEngine
84
- extend ActiveModel::Naming
85
- end
86
- end
@@ -1 +0,0 @@
1
- create.js.erb
@@ -1 +0,0 @@
1
- edit.html.erb
@@ -1 +0,0 @@
1
- new.html.erb
@@ -1 +0,0 @@
1
- new.html.erb
@@ -1 +0,0 @@
1
- Edit world!
@@ -1 +0,0 @@
1
- New world!
@@ -1 +0,0 @@
1
- <content>I should not be displayed</content>
@@ -1 +0,0 @@
1
- <customer-name><%= @customer.name %></customer-name>
@@ -1 +0,0 @@
1
- alert("Hi");