Skip to content

Commit

Permalink
Upgrade to attributor 5.1.
Browse files Browse the repository at this point in the history
Fix the spec based on the semantics of having examples 
in descriptions based on ‘shallow’-ness.

Changed the spec as a shallow description of a collection should still have the example (as it’s a leaf).

Signed-off-by: Josep M. Blanquer <blanquer@gmail.com>
  • Loading branch information
blanquer committed Aug 19, 2016
1 parent e276478 commit bc78a21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion praxis-blueprints.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_runtime_dependency('randexp', ['~> 0'])
spec.add_runtime_dependency('attributor', ['>= 5.0.2'])
spec.add_runtime_dependency('attributor', ['>= 5.1'])
spec.add_runtime_dependency('activesupport', ['>= 3'])

spec.add_development_dependency 'bundler', '~> 1.6'
Expand Down
5 changes: 4 additions & 1 deletion spec/praxis-blueprints/blueprint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,14 @@
end

it 'outputs examples for leaf values using the provided example' do

output[:attributes][:name][:example].should eq example.name
output[:attributes][:age][:example].should eq example.age

output[:attributes][:aliases].should have_key(:example)
output[:attributes][:aliases][:example].should eq example.aliases.dump

output[:attributes][:full_name].should_not have_key(:example)
output[:attributes][:aliases].should_not have_key(:example)

parents_attributes = output[:attributes][:parents][:type][:attributes]
parents_attributes[:father][:example].should eq example.parents.father
Expand Down

0 comments on commit bc78a21

Please sign in to comment.