spec/base_spec.rb in remarkable-3.1.2 vs spec/base_spec.rb in remarkable-3.1.3

- old
+ new

@@ -36,7 +36,13 @@ end it 'should allow Macros and Matchers to be added to any class' do MatchersSandbox.new.should respond_to(:contain) end - + + it 'should raise an error if include matchers is called without target and rspec is not loaded' do + Remarkable.stub!(:rspec_defined?).and_return(false) + lambda { + Remarkable.include_matchers!(String) + }.should raise_error(ArgumentError, "You haven't supplied the target to include_matchers! and RSpec is not loaded, so we cannot infer one.") + end end