fa_rails 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/fa_rails.gemspec +1 -1
- data/spec/lib/fa_spec.rb +22 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 771f0170fa690c018158f89119397efc56702af5e02b94bb2627b0f6f2b4cab6
|
4
|
+
data.tar.gz: 2b5bef6128cd65714edaea480c8024c3f871a3d4c240d79eb008411afbfc0f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06bb529758d62780a54fcc01db8a94ae5bf71e12a4f5b936ff7a7c5198eb96d5ed0e31cc41f9690dba08a3010542ffbdeb7ac0661f2668b82404705b5eac8bbf
|
7
|
+
data.tar.gz: 605a8dfe7d36472432e87f99f55faab94e8e6012af8f0e52e448230126ad4ea537fc13fd6494b020c1e9b71bc19ea5d9193ab22444fb454b7db49347338107f2
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
data/spec/lib/fa_spec.rb
CHANGED
@@ -3,13 +3,28 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe FA do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
describe 'link' do
|
7
|
+
it 'should generate the correct link tag' do
|
8
|
+
tag = FA::Link.new(version: 'v0.1.2', integrity: 'sha384-abc', pro: true)
|
9
|
+
expect(tag.safe).to eql(
|
10
|
+
'<link rel="stylesheet" ' \
|
11
|
+
'href="https://pro.fontawesome.com/releases/v0.1.2/css/all.css" ' \
|
12
|
+
'integrity="sha384-abc" crossorigin="anonymous">'
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should generate the correct kit link tag' do
|
17
|
+
tag = FA::Link.new(kit: 'abcdefg', pro: true)
|
18
|
+
expect(tag.kit).to eql(
|
19
|
+
"<script src=\"https://kit.fontawesome.com/abcdefg.js\"></script>"
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should raise an ArgumentError if not initialized correctly' do
|
24
|
+
expect { FA::Link.new(version: 'v0.0.0', pro: true) }.to raise_error(
|
25
|
+
ArgumentError, 'Must specify version and integrity or kit.'
|
26
|
+
)
|
27
|
+
end
|
13
28
|
end
|
14
29
|
|
15
30
|
describe 'icon' do
|