This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
class Foo | |
def self.bar(first, second, third) | |
err_msg = '%s cannot be nil' | |
raise ArgumentError, err_msg % 'first' unless first | |
raise ArgumentError, err_msg % 'second' unless second | |
raise ArgumentError, err_msg % 'third' unless third | |
"#{first} #{second} #{third}" |