Skip to content

Commit

Permalink
Merge pull request #108 from publify/fix-rubocop-capybara-offenses
Browse files Browse the repository at this point in the history
Fix new rubocop-capybara offenses
  • Loading branch information
mvz authored Sep 29, 2023
2 parents 7aabb2e + 59afe5c commit 4a1334c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions publify_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rails-controller-testing", "~> 1.0.1"
s.add_development_dependency "rspec-rails", "~> 6.0"
s.add_development_dependency "rubocop", "~> 1.56.1"
s.add_development_dependency "rubocop-capybara", "~> 2.19.0"
s.add_development_dependency "rubocop-factory_bot", "~> 2.24.0"
s.add_development_dependency "rubocop-performance", "~> 1.19.0"
s.add_development_dependency "rubocop-rails", "~> 2.20.2"
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/admin/articles_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def base_article(options = {})
a = create(:article, keywords: '"foo bar", baz')
get :edit, params: { id: a.id }
expect(response.body)
.to have_selector("input[id=article_keywords][value='baz, \"foo bar\"']")
.to have_css("input[id=article_keywords][value='baz, \"foo bar\"']")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/author_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe "display_profile_item" do
it "displays the item as a list item if show_item is true" do
item = display_profile_item("[email protected]", "Jabber:")
expect(item).to have_selector("li", text: "Jabber: [email protected]")
expect(item).to have_css("li", text: "Jabber: [email protected]")
end

it "does not display the item empty" do
Expand All @@ -16,7 +16,7 @@

it "displays a link if the item is an url" do
item = display_profile_item("http://twitter.com/mytwitter", "Twitter:")
expect(item).to have_selector("li") do
expect(item).to have_css("li") do
have_link("http://twitter.com/mytwitter")
end
end
Expand Down

0 comments on commit 4a1334c

Please sign in to comment.