spec/attributor_spec.rb in attributor-2.6.0 vs spec/attributor_spec.rb in attributor-2.6.1
- old
+ new
@@ -20,6 +20,23 @@
Attributor.resolve_type(type).should == expected_type
end
end
end
end
+
+ context '.humanize_context' do
+ let(:context) { [] }
+
+ subject(:humanized) { Attributor.humanize_context(context) }
+
+ context 'with string value' do
+ let(:context) { 'some-context'}
+ it { should eq('some-context')}
+ end
+
+ context 'with array value' do
+ let(:context) { ['a', 'b'] }
+ it { should eq('a.b') }
+ end
+
+ end
end
\ No newline at end of file