Skip to content

Commit

Permalink
Fix encoding in ReflexFactoryTest
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Mar 12, 2024
1 parent 538582d commit dd140c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/reflex_factory_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class StimulusReflex::ReflexFactoryTest < ActionCable::Channel::TestCase

test "reflex class needs to be an ancestor of StimulusReflex::Reflex" do
exception = assert_raises(NameError) { StimulusReflex::ReflexFactory.new(subscribe, {target: "Object#inspect"}).call }
assert_equal "uninitialized constant ObjectReflex", exception.message
assert_includes exception.message.force_encoding("utf-8"), "uninitialized constant ObjectReflex"

exception = assert_raises(ArgumentError) { StimulusReflex::ReflexFactory.new(subscribe, {target: "NoReflex#no_reflex"}).call }
assert_equal "NoReflex is not a StimulusReflex::Reflex", exception.message
Expand Down

0 comments on commit dd140c3

Please sign in to comment.