rao-view_helper 0.0.41.pre → 0.0.42.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: 1e383e433a25643e66322218621160c5ae61a2cb0234e0f93c7e6adf29a9a03b
|
4
|
+
data.tar.gz: '093a81b8bcd66d6fb9f228d682c02b7a50fc36f24ca12520b31c1b5efab4ec8f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df919ea92df0c601c067725c6e071601b02967b12112130b112c39620338f6aafd03bca855178731b017309306ab6a585b62f274fb91bca87ae241ab2af7213b
|
7
|
+
data.tar.gz: 502d14e206ce3b492bfce6c2f9623243a06bd676cc4f1581589197d34f913c2cc1a0fa72812d47ac7a7d6a11535ff8d6e0ac15e42dddd40dbdacf729ad90360a
|
@@ -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.42.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-05-20 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.3
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: View Helper Objects for Ruby on Rails.
|