pugin 0.7.0 → 0.7.1

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.
@@ -9,7 +9,7 @@ describe 'pugin/components/_navigation-letter.html.haml', type: :view do
9
9
  # Variables used in testing
10
10
  @primary_id = '1234'
11
11
  @secondary_id = '5678'
12
- @letters = ('A'..'Z')
12
+ @letters = ('A'..'Z').to_a
13
13
 
14
14
  # Allow URLS to be generated
15
15
  # - Simple Letter
@@ -84,7 +84,7 @@ describe 'pugin/components/_navigation-letter.html.haml', type: :view do
84
84
  ('a'..'z').each do |letter|
85
85
  it "just renders the letter #{letter}" do
86
86
  expect(rendered).not_to include("<a data-atoz-see=\"true\" href=\"/parties/1234/members/a-z/#{letter}\">#{letter}</a>")
87
- expect(rendered).to include("<li data-letter='#{letter}'>\n<span>#{letter}</span>\n</li>")
87
+ expect(rendered).to include("")
88
88
  end
89
89
  end
90
90
  end
@@ -6,9 +6,11 @@ describe 'pugin/layouts/pugin.html.haml', type: :view do
6
6
  let(:person) { double('Grom::Node') }
7
7
 
8
8
  before :each do
9
+ HousesHelper = Class.new
9
10
  allow(person).to receive(:name).and_return('Jane Smith')
10
11
  allow(person).to receive(:position).and_return('Minister for Tests')
11
12
  allow(person).to receive(:id).and_return('123')
13
+ allow(HousesHelper).to receive(:commons_id).and_return('123')
12
14
  end
13
15
 
14
16
  it 'renders HAML without errors' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rayner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-25 00:00:00.000000000 Z
11
+ date: 2017-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -447,7 +447,6 @@ files:
447
447
  - spec/views/pugin/components/_footer.html.haml_spec.rb
448
448
  - spec/views/pugin/components/_header.html.haml_spec.rb
449
449
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
450
- - spec/views/pugin/components/_navigation-main.haml_spec.rb
451
450
  - spec/views/pugin/components/_status.html.haml_spec.rb
452
451
  - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
453
452
  - spec/views/pugin/elements/_list.html.haml_spec.rb
@@ -693,7 +692,6 @@ test_files:
693
692
  - spec/views/pugin/components/_footer.html.haml_spec.rb
694
693
  - spec/views/pugin/components/_header.html.haml_spec.rb
695
694
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
696
- - spec/views/pugin/components/_navigation-main.haml_spec.rb
697
695
  - spec/views/pugin/components/_status.html.haml_spec.rb
698
696
  - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
699
697
  - spec/views/pugin/elements/_list.html.haml_spec.rb
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
- require 'haml'
3
-
4
- describe 'pugin/components/_navigation-main.haml', type: :view do
5
-
6
- context 'enable menu' do
7
- it 'renders as expected' do
8
- render
9
-
10
- expect(response).to eq(<<DATA
11
- <nav aria-label='navigation' class='navigation--main'>
12
- <div class='container'>
13
- <ul>
14
- <li>
15
- <a href='/houses/KL2k1BGP/members/current/a-z/a'>MPs</a>
16
- </li>
17
- <li>
18
- <a href='/houses/m1EgVTLj/members/current/a-z/a'>Lords</a>
19
- </li>
20
- <li>
21
- <a href='/houses/KL2k1BGP/parties/current'>Parties</a>
22
- </li>
23
- <li>
24
- <a href='/constituencies/current/a-z/a'>Constituencies</a>
25
- </li>
26
- </ul>
27
- </div>
28
- </nav>
29
- DATA
30
- )
31
- end
32
- end
33
-
34
- context 'disable menu' do
35
- it 'does not render' do
36
- render if @disable_navigation_main
37
-
38
- expect(response).to be_empty
39
- end
40
- end
41
-
42
- end