@@ -12,61 +12,61 @@ module Hyperclient
1212 end
1313
1414 it 'exposes the collection as methods' do
15- collection . title . must_equal 'Real World ASP.NET MVC3'
16- collection . description . must_match ( /production/ )
17- collection . permitted . must_equal true
15+ _ ( collection . title ) . must_equal 'Real World ASP.NET MVC3'
16+ _ ( collection . description ) . must_match ( /production/ )
17+ _ ( collection . permitted ) . must_equal true
1818 end
1919
2020 it 'exposes collection as a hash' do
21- collection [ 'title' ] . must_equal 'Real World ASP.NET MVC3'
22- collection [ 'description' ] . must_match ( /production/ )
23- collection [ 'permitted' ] . must_equal true
21+ _ ( collection [ 'title' ] ) . must_equal 'Real World ASP.NET MVC3'
22+ _ ( collection [ 'description' ] ) . must_match ( /production/ )
23+ _ ( collection [ 'permitted' ] ) . must_equal true
2424 end
2525
2626 it 'correctly responds to methods' do
27- collection . must_respond_to :title
27+ _ ( collection ) . must_respond_to :title
2828 end
2929
3030 it 'acts as enumerable' do
3131 names = collection . map do |name , _value |
3232 name
3333 end
3434
35- names . must_equal %w[ _links title description permitted _hidden_attribute _embedded ]
35+ _ ( names ) . must_equal %w[ _links title description permitted _hidden_attribute _embedded ]
3636 end
3737
3838 describe '#to_hash' do
3939 it 'returns the wrapped collection as a hash' do
40- collection . to_hash . must_be_kind_of Hash
40+ _ ( collection . to_hash ) . must_be_kind_of Hash
4141 end
4242 end
4343
4444 describe 'include?' do
4545 it 'returns true for keys that exist' do
46- collection . include? ( '_links' ) . must_equal true
46+ _ ( collection . include? ( '_links' ) ) . must_equal true
4747 end
4848
4949 it 'returns false for missing keys' do
50- collection . include? ( 'missing key' ) . must_equal false
50+ _ ( collection . include? ( 'missing key' ) ) . must_equal false
5151 end
5252 end
5353
5454 describe '#fetch' do
5555 it 'returns the value for keys that exist' do
56- collection . fetch ( 'title' ) . must_equal 'Real World ASP.NET MVC3'
56+ _ ( collection . fetch ( 'title' ) ) . must_equal 'Real World ASP.NET MVC3'
5757 end
5858
5959 it 'raises an error for missing keys' do
60- proc { collection . fetch ( 'missing key' ) } . must_raise KeyError
60+ _ ( proc { collection . fetch ( 'missing key' ) } ) . must_raise KeyError
6161 end
6262
6363 describe 'with a default value' do
6464 it 'returns the value for keys that exist' do
65- collection . fetch ( 'title' , 'default' ) . must_equal 'Real World ASP.NET MVC3'
65+ _ ( collection . fetch ( 'title' , 'default' ) ) . must_equal 'Real World ASP.NET MVC3'
6666 end
6767
6868 it 'returns the default value for missing keys' do
69- collection . fetch ( 'missing key' , 'default' ) . must_equal 'default'
69+ _ ( collection . fetch ( 'missing key' , 'default' ) ) . must_equal 'default'
7070 end
7171 end
7272 end
0 commit comments