Skip to content

Commit

Permalink
Autofix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Mar 6, 2024
1 parent 19762e4 commit b184619
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions spec/react_on_rails/generators/dev_tests_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@

it "changes package.json to use local react-on-rails version of module" do
assert_file("package.json") do |contents|
assert_match('"react-on-rails"', contents)
assert_match('"postinstall"', contents)
expect(contents).to match('"react-on-rails"')
expect(contents).to match('"postinstall"')
end
end

it "adds test-related gems to Gemfile" do
assert_file("Gemfile") do |contents|
assert_match("gem \"rspec-rails\", group: :test", contents)
assert_match("gem \"coveralls\", require: false", contents)
assert_match("gem \"chromedriver-helper\", group: :test", contents)
expect(contents).to match("gem \"rspec-rails\", group: :test")
expect(contents).to match("gem \"coveralls\", require: false")
expect(contents).to match("gem \"chromedriver-helper\", group: :test")
end
end
end
Expand All @@ -49,7 +49,7 @@

it "adds prerender for examples with example-server-rendering" do
assert_file("app/views/hello_world/index.html.erb") do |contents|
assert_match("prerender: true", contents)
expect(contents).to match("prerender: true")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/react_on_rails/generators/install_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

it "adds ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)" do
expected = ReactOnRails::Generators::BaseGenerator::CONFIGURE_RSPEC_TO_COMPILE_ASSETS
assert_file("spec/rails_helper.rb") { |contents| assert_match(expected, contents) }
assert_file("spec/rails_helper.rb") { |contents| expect(contents).to match(expected) }
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
shared_examples "no_redux_generator" do
it "creates appropriate templates" do
assert_file("app/javascript/packs/hello-world-bundle.js") do |contents|
assert_match("import HelloWorld from '../bundles/HelloWorld/components/HelloWorld';", contents)
expect(contents).to match("import HelloWorld from '../bundles/HelloWorld/components/HelloWorld';")
end

assert_file("app/views/hello_world/index.html.erb") do |contents|
assert_match(/"HelloWorld"/, contents)
expect(contents).to match(/"HelloWorld"/)
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

it "creates appropriate templates" do
assert_file("app/javascript/packs/hello-world-bundle.js") do |contents|
assert_match("import HelloWorldApp from '../bundles/HelloWorld/startup/HelloWorldApp';", contents)
expect(contents).to match("import HelloWorldApp from '../bundles/HelloWorld/startup/HelloWorldApp';")
end
assert_file("app/views/hello_world/index.html.erb") do |contents|
assert_match(/"HelloWorldApp"/, contents)
expect(contents).to match(/"HelloWorldApp"/)
end
end

Expand Down

0 comments on commit b184619

Please sign in to comment.