rao-view_helper 0.0.41.pre → 0.0.46.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: d0fd7ca2a2f3d5ad45dc5b9e784598d2dc8fd5f4cd6ad510862b758de25a38a5
|
4
|
+
data.tar.gz: f4d0387c33fb64dd237e67020a2668c30068bde24fbb5aa0daa6fec55fea9472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 299dea1b0ff960ca10a54af8d665b5e3a8d0aaf758c6ec367aada482405c4be312314a8adef7b3d337bc4b4416636fc5169d77a8545c0c8ac5b8fc011266a8c7
|
7
|
+
data.tar.gz: abec9a5e9167a248263e0a8fec5d106563717564ebc3dcbc2092813890e60b8eaa9fd595eeb881a11898265e7707b532fe16ea15759926b0a4c5a6573c0ee3fe
|
@@ -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.46.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-10-21 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.
|