rao-view_helper 0.0.39.pre → 0.0.44.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rao/view_helper/spec_helper.rb +7 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3efe8af6c06932ef6f2119259f76548e26c0c9abda16cd13e277e7e1a97ee459
|
4
|
+
data.tar.gz: 367fe5a56825f77976578db2b65faea6e5ca42af2e61db08ba4127ef04c0f0a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fb47d68cc7d311a48fcd605715e56dcb306f5008ec6623d8fc1be060100e6baba87603c740117a8326a2f63e6401b19b95555049563774a4f0be0975b751ece
|
7
|
+
data.tar.gz: 8e37a156e21ceabeb57f7d3e50e59724b7cbf7b59e82e208c08a7cb13d4e66ac26f4512700cc4d4702df1001d0c0406736809a8ce8dbeb71d3da85c4d78b929f
|
@@ -30,14 +30,13 @@ module Rao
|
|
30
30
|
#
|
31
31
|
# # if you need to set things like a request on your context you can
|
32
32
|
# # do it as follows:
|
33
|
-
# let(:request) { ActionDispatch::Request.new({ "SCRIPT_NAME" => "", "PATH_INFO" => "/de" }) }
|
34
|
-
#
|
35
|
-
# before(:each) do
|
36
|
-
# view.request = request
|
37
|
-
# end
|
33
|
+
# let(:request) { ActionDispatch::Request.new({ 'rack.input' => StringIO.new, "SCRIPT_NAME" => "", "PATH_INFO" => "/de" }) }
|
38
34
|
#
|
39
35
|
# # this is useful when your view helper makes call like c.request.path
|
40
36
|
#
|
37
|
+
# # You can add get params to the request:
|
38
|
+
# let(:request) { ActionDispatch::Request.new({ 'rack.input' => StringIO.new, 'QUERY_STRING' => "foo=bar" }) }
|
39
|
+
#
|
41
40
|
# # if you need to change the default_url_options you may do so like this
|
42
41
|
# let(:default_url_options) { { host: 'example.org' } }
|
43
42
|
#
|
@@ -72,7 +71,9 @@ module Rao
|
|
72
71
|
def self.included(mod)
|
73
72
|
mod.let(:view_paths) { ActionController::Base.view_paths }
|
74
73
|
mod.let(:assigns) { {} }
|
75
|
-
mod.let(:
|
74
|
+
mod.let(:request) { ActionDispatch::Request.new({ 'rack.input' => StringIO.new }) }
|
75
|
+
mod.let(:controller) { ActionController::Base.new.tap { |c| c.request = request; c } }
|
76
|
+
mod.let(:view) { ActionView::Base.new(view_paths, assigns, controller) }
|
76
77
|
mod.let(:view_helper) { described_class.new(view) }
|
77
78
|
mod.let(:method_name) { |e| e.metadata[:example_group][:description].to_sym }
|
78
79
|
mod.let(:default_url_options) { { host: 'localhost:3000' } }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-view_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.44.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: 1.3.1
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.1.
|
149
|
+
rubygems_version: 3.1.4
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: View Helper Objects for Ruby on Rails.
|