mountain_view 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -2
- data/app/helpers/mountain_view/application_helper.rb +27 -0
- data/lib/mountain_view/engine.rb +1 -0
- data/lib/mountain_view/version.rb +1 -1
- data/test/dummy/app/components/header/_header.html.erb +1 -1
- data/test/dummy/app/components/header/header.css +8 -0
- data/test/dummy/app/components/header/header.yml +2 -0
- data/test/dummy/app/views/home/index.html.erb +1 -1
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/log/development.log +384 -0
- data/test/dummy/log/test.log +1161 -0
- data/test/helpers/mountain_view/component_helper_test.rb +2 -1
- data/test/mountain_view/component_test.rb +1 -0
- data/test/mountain_view_test.rb +7 -0
- metadata +3 -2
@@ -2,10 +2,11 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class MountainView::ComponentHelperTest < ActionView::TestCase
|
4
4
|
test "renders the proper component" do
|
5
|
-
rendered = render_component("header", title: "Pepe")
|
5
|
+
rendered = render_component("header", id: 1, title: "Pepe")
|
6
6
|
|
7
7
|
expected = /Pepe/
|
8
8
|
|
9
9
|
assert_match expected, rendered
|
10
|
+
assert_match /href=\"\/products\/1\"/, rendered
|
10
11
|
end
|
11
12
|
end
|
data/test/mountain_view_test.rb
CHANGED
@@ -47,6 +47,13 @@ class MountainViewTest < ActionDispatch::IntegrationTest
|
|
47
47
|
assert_match(/20 Mountains you didn.+t know they even existed/, response.body)
|
48
48
|
end
|
49
49
|
|
50
|
+
test "shows specific component that uses a main app url okay" do
|
51
|
+
get "/mountain_view/styleguide/header"
|
52
|
+
|
53
|
+
assert_response :success
|
54
|
+
assert_match(/href=\"\/products\/2\"/, response.body)
|
55
|
+
end
|
56
|
+
|
50
57
|
test "shows a hint message if the component stub file is empty" do
|
51
58
|
get "/mountain_view/styleguide/breadcrumbs"
|
52
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mountain_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignacio Gutierrez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- app/assets/stylesheets/mountain_view/prism.css
|
59
59
|
- app/assets/stylesheets/mountain_view/styleguide.css
|
60
60
|
- app/controllers/mountain_view/styleguide_controller.rb
|
61
|
+
- app/helpers/mountain_view/application_helper.rb
|
61
62
|
- app/helpers/mountain_view/component_helper.rb
|
62
63
|
- app/helpers/mountain_view/styleguide_helper.rb
|
63
64
|
- app/views/layouts/mountain_view.html.erb
|