Permalink
Browse files

Fix spec to pass under ruby 1.9

  • Loading branch information...
1 parent 4d56634 commit afcb223dd3c4b10b9582d0da0a31db20f2fdd7bb @dkubb dkubb committed Jun 11, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 spec/unit/virtus/class_methods/attributes_spec.rb
@@ -16,8 +16,7 @@
it { should be_instance_of(Virtus::AttributeSet) }
it 'returns a deprecation warning' do
- lambda { subject }.should change { $stderr.string.dup }.from('').to(
- "#{object}.attributes is deprecated. Use #{object}.attribute_set instead: #{__FILE__}:4\n"
- )
+ subject
+ $stderr.string.should =~ /\A#{object}.attributes is deprecated. Use #{object}.attribute_set instead: #{__FILE__}:4\b/
end
end

0 comments on commit afcb223

Please sign in to comment.