Skip to content

Commit

Permalink
Add a spec setting attributes with a value that cant be duck typed to…
Browse files Browse the repository at this point in the history
… a hash
  • Loading branch information
fgrehm committed Mar 12, 2012
1 parent 4dce489 commit d976a1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/unit/virtus/instance_methods/attributes_spec.rb
Expand Up @@ -126,5 +126,13 @@ def to_hash
object.age.should == 5
end
end

context "when given values does not respond_to?(:to_hash)" do
let(:attribute_values) { '' }

it 'sets attributes' do
expect { subject }.to raise_error(NoMethodError)
end
end
end
end

0 comments on commit d976a1c

Please sign in to comment.