Skip to content

Commit

Permalink
Add failing test for XPath match
Browse files Browse the repository at this point in the history
  • Loading branch information
paracycle committed Dec 25, 2021
1 parent 4f4dc55 commit 092a657
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ group(:development, :test) do
gem("config", require: false)
gem("aasm", require: false)
gem("bcrypt", require: false)
gem("xpath", require: false)
end
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ GEM
websocket-driver (0.7.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.26)
yard-sorbet (0.5.3)
sorbet-runtime (>= 0.5)
Expand Down Expand Up @@ -318,6 +320,7 @@ DEPENDENCIES
sqlite3
state_machines
tapioca!
xpath

BUNDLED WITH
2.2.32
8 changes: 8 additions & 0 deletions spec/tapioca/compilers/dsl/rails_generators_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ module Entirely
assert_equal(["AppGenerator", "NamedGenerator", "UnnamedGenerator"], gathered_constants)
end

it("does not gather XPath") do
add_ruby_file("xpath.rb", <<~RUBY)
require "xpath"
RUBY

assert_empty(gathered_constants)
end

it("ignores generator classes without a name") do
add_ruby_file("content.rb", <<~RUBY)
unnamed = Class.new(::Rails::Generators::Base)
Expand Down

0 comments on commit 092a657

Please sign in to comment.