mountain_view 0.6.0 → 0.7.0

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.
@@ -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
@@ -17,6 +17,7 @@ class MountainViewComponentTest < ActiveSupport::TestCase
17
17
  component = MountainView::Component.new("header")
18
18
 
19
19
  expected_stub = {
20
+ id: 1,
20
21
  title: "20 Mountains you didn't know they even existed",
21
22
  subtitle: "Buzzfeed title"
22
23
  }
@@ -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.6.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-05-26 00:00:00.000000000 Z
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