Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/safe/of_next_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def initialize(a, b:)
end
end

class OptionsHash
def initialize(opts = {})
raise "options hash required!"
end
end

def test_of_next
neato_mocktail = Mocktail.of_next(Neato)
next_neato = Neato.new
Expand Down Expand Up @@ -52,6 +58,12 @@ def test_of_next_multiples_then_returns_to_replaced_version
assert Neato.new.to_s.include?("Mocktail")
end

def test_options_hash_initializer
thing = Mocktail.of_next(OptionsHash)

assert_equal thing, OptionsHash.new(item: "hello")
end

module AModule
end

Expand Down