Skip to content

Commit

Permalink
fix spec for ruby earlier than 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Jan 5, 2023
1 parent 7565d10 commit 5d93695
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def self.model_name

obj.freeze

# ruby previous to 2.5 didn't have FrozenError
expected_error = defined?(FrozenError) ? FrozenError : RuntimeError

expect {
obj.str = "foo"
}.to raise_error(FrozenError)
Expand Down

0 comments on commit 5d93695

Please sign in to comment.