blue_print 1.1.0 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/blue_print/behavior.rb +1 -1
- data/lib/blue_print/helper.rb +1 -1
- data/lib/blue_print/version.rb +1 -1
- data/spec/lib/blue_print/helper_spec.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c548622e35b491381ce58dcb9ae08dda61f0397
|
4
|
+
data.tar.gz: 55752678a2d5cfb9a1a2fcfbbb7ed087e9159b9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a418665ce91d0fe292cc57ed2aa9a065b61e666ccd193f8c3331e3c01c9676a65400fbf6ee8fa7e2293e88a0cb2e4c0f09b231977bd99054fb84e29caf50708b
|
7
|
+
data.tar.gz: f26de505f6974276e02c6daa0c25abaa8886a01761040498fc8416c353df14948c34ff69cf404f7492c1d67c5303d9900bba4ba8243db1a1612dd9a4f11f0aca
|
data/lib/blue_print/behavior.rb
CHANGED
@@ -50,7 +50,7 @@ module BluePrint::Behavior
|
|
50
50
|
|
51
51
|
module_eval <<-EOC
|
52
52
|
def #{method_name}(*args)
|
53
|
-
|
53
|
+
within_context_of(#{context}, proc { super(*args) }) do
|
54
54
|
#{target}_with_#{behavior_name}#{punctuation}(*args)
|
55
55
|
end
|
56
56
|
end
|
data/lib/blue_print/helper.rb
CHANGED
data/lib/blue_print/version.rb
CHANGED
@@ -3,13 +3,13 @@ require 'spec_helper'
|
|
3
3
|
describe BluePrint::Helper do
|
4
4
|
subject(:helper) { Class.new { include BluePrint::Helper }.new }
|
5
5
|
|
6
|
-
describe '#
|
6
|
+
describe '#within_context_of' do
|
7
7
|
context 'with active context' do
|
8
8
|
let(:context) { double(active?: true) }
|
9
9
|
|
10
10
|
it 'runs block' do
|
11
11
|
helper.should_receive(:message).once
|
12
|
-
helper.
|
12
|
+
helper.within_context_of(context) do |env|
|
13
13
|
expect(env).to eq(BluePrint.env)
|
14
14
|
helper.message
|
15
15
|
end
|
@@ -21,7 +21,7 @@ describe BluePrint::Helper do
|
|
21
21
|
|
22
22
|
it 'not runs block' do
|
23
23
|
helper.should_not_receive(:message)
|
24
|
-
helper.
|
24
|
+
helper.within_context_of(context) do
|
25
25
|
helper.message
|
26
26
|
end
|
27
27
|
end
|
@@ -29,7 +29,7 @@ describe BluePrint::Helper do
|
|
29
29
|
it 'runs fallback' do
|
30
30
|
helper.should_receive(:fallback)
|
31
31
|
helper.should_not_receive(:message)
|
32
|
-
helper.
|
32
|
+
helper.within_context_of(context, proc { helper.fallback }) do
|
33
33
|
helper.message
|
34
34
|
end
|
35
35
|
end
|