Skip to content

Commit

Permalink
Updated specs to use the safer >= 1.9.0 comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Kubb committed Dec 6, 2008
1 parent a4a281f commit 52f58b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/lazy_array_spec.rb
Expand Up @@ -86,7 +86,7 @@ def should_not_change_subject
it 'should not change self' do
# XXX: the following does not work with Array#delete_if, even when nothing removed (ruby bug?)
#subject.freeze
#lambda { action }.should_not raise_error(RUBY_VERSION <= '1.8.7' ? TypeError : RuntimeError)
#lambda { action }.should_not raise_error(RUBY_VERSION >= '1.9.0' ? RuntimeError : TypeError)
lambda { action }.should_not change(subject, :entries)
end
end
Expand Down Expand Up @@ -154,7 +154,7 @@ def action
end

it 'should not allow any modifications' do
lambda { subject << @steve }.should raise_error(RUBY_VERSION <= '1.8.7' ? TypeError : RuntimeError)
lambda { subject << @steve }.should raise_error(RUBY_VERSION >= '1.9.0' ? RuntimeError : TypeError)
end
end

Expand Down

0 comments on commit 52f58b4

Please sign in to comment.