mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Add spec for positive case in macro scope in Lint/LiteralsComparison rule
				
					
				
			This commit is contained in:
		
							parent
							
								
									2dc21a00d9
								
							
						
					
					
						commit
						99c81d3630
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -48,6 +48,15 @@ module Ameba::Rule::Lint
 | 
			
		|||
           # ^^^^^^^^^^^^^^ error: Comparison always evaluates to true
 | 
			
		||||
          CRYSTAL
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      it "passes for valid cases" do
 | 
			
		||||
        expect_no_issues subject, <<-CRYSTAL
 | 
			
		||||
          {{ "foo" == foo }}
 | 
			
		||||
          {{ "foo" != foo }}
 | 
			
		||||
          {% foo == "foo" %}
 | 
			
		||||
          {% foo != "foo" %}
 | 
			
		||||
          CRYSTAL
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "reports rule, pos and message" do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue