lib/rspec/its.rb in rspec-its-1.1.0 vs lib/rspec/its.rb in rspec-its-1.2.0

- old
+ new

@@ -118,19 +118,22 @@ end def is_expected expect(__its_subject) end + alias_method :are_expected, :is_expected def should(matcher=nil, message=nil) RSpec::Expectations::PositiveExpectationHandler.handle_matcher(__its_subject, matcher, message) end def should_not(matcher=nil, message=nil) RSpec::Expectations::NegativeExpectationHandler.handle_matcher(__its_subject, matcher, message) end - options << { :caller => its_caller } + options << {} unless options.last.kind_of?(Hash) + options.last.merge!(:caller => its_caller) + example(nil, *options, &block) end end