require 'spec_helper' RSpec.describe Pluginscan::VariableCheck do describe "#ignore?" do it "returns true when there is 1 match and it is known to be safe" do expect(described_class.new({}).ignore?("$_GET", "if ( isset( $_GET['action'] ) ) {")).to eq true end # it "returns false when there are 2 matches and only 1 is known safe" do # expect(described_class.match_count("$_POST", "$submitted = isset( $_POST[$tagname] ) ? $_POST[$tagname] : '';")).to eq 2 # end end end