 5e1806e796
			
		
	
	
		5e1806e796
		
	
	
	
	
		
			
			There’s too many warnings to start enabling `rubocop-rspec` by default but let’s at least apply the cleanups it does automatically.
		
			
				
	
	
		
			15 lines
		
	
	
		
			368 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			368 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "extend/string"
 | |
| 
 | |
| describe StringInreplaceExtension do
 | |
|   subject { string.extend(described_class) }
 | |
| 
 | |
|   let(:string) { "foobar" }
 | |
| 
 | |
|   describe "#sub!" do
 | |
|     it "adds an error to #errors when no replacement was made" do
 | |
|       subject.sub! "not here", "test"
 | |
|       expect(subject.errors).to eq(['expected replacement of "not here" with "test"'])
 | |
|     end
 | |
|   end
 | |
| end
 |