Skip to content

Commit

Permalink
Merge 446486c into 5c6f62a
Browse files Browse the repository at this point in the history
  • Loading branch information
m1foley committed Apr 12, 2015
2 parents 5c6f62a + 446486c commit f97dd07
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/pre_commit/checks/pry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def message
end

def pattern
"binding\.pry"
"binding\.(remote_)?pry"
end

def self.description
Expand Down
2 changes: 2 additions & 0 deletions test/files/pry_file.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class PryFile
def blam
binding.pry
binding.remote_pry
binding.remote_pry_em
end
end
6 changes: 4 additions & 2 deletions test/unit/plugins/pre_commit/checks/pry_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@

it "fails if file contains pry" do
check.call([fixture_file('pry_file.rb')]).to_a.must_equal([
"binding.pry found:",
"test/files/pry_file.rb:3: binding.pry"
"binding.pry found:", "\
test/files/pry_file.rb:3: binding.pry
test/files/pry_file.rb:4: binding.remote_pry
test/files/pry_file.rb:5: binding.remote_pry_em"
])
end
end

0 comments on commit f97dd07

Please sign in to comment.