Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unrequired package #37

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,4 @@ group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem 'capybara'
gem 'selenium-webdriver'
gem 'rails-controller-testing'
end
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ GEM
activesupport (= 7.1.3.4)
bundler (>= 1.15.0)
railties (= 7.1.3.4)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand Down Expand Up @@ -396,7 +392,6 @@ DEPENDENCIES
mini_magick
puma (>= 5.0)
rails (~> 7.1.3, >= 7.1.3.4)
rails-controller-testing
redis (>= 4.0.1)
rspec-rails (~> 6.0.0)
selenium-webdriver
Expand Down
20 changes: 10 additions & 10 deletions spec/controllers/analytics_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

it "assigns the correct instance variables" do
get :index
expect(assigns(:total_page_views)).to be_a(Integer)
expect(assigns(:total_link_clicks)).to be_a(Integer)
expect(assigns(:total_achievement_views)).to be_a(Integer)
expect(assigns(:unique_visitors)).to be_a(Integer)
expect(assigns(:latest_daily_metric)).to be_a(DailyMetric)
expect(assigns(:link_analytics)).to be_an(Array)
expect(assigns(:achievement_analytics)).to be_an(Array)
expect(assigns(:daily_views)).to be_a(Hash)
expect(assigns(:browser_data)).to be_a(Hash)
expect(controller.instance_variable_get(:@total_page_views)).to be_a(Integer)
expect(controller.instance_variable_get(:@total_link_clicks)).to be_a(Integer)
expect(controller.instance_variable_get(:@total_achievement_views)).to be_a(Integer)
expect(controller.instance_variable_get(:@unique_visitors)).to be_a(Integer)
expect(controller.instance_variable_get(:@latest_daily_metric)).to be_a(DailyMetric)
expect(controller.instance_variable_get(:@link_analytics)).to be_an(Array)
expect(controller.instance_variable_get(:@achievement_analytics)).to be_an(Array)
expect(controller.instance_variable_get(:@daily_views)).to be_a(Hash)
expect(controller.instance_variable_get(:@browser_data)).to be_a(Hash)
end
end
end
end
10 changes: 5 additions & 5 deletions spec/controllers/links_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@

it "assigns the correct instance variables" do
get :user_links, params: { username: user.username }
expect(assigns(:user)).to eq(user)
expect(assigns(:links)).to be_an(ActiveRecord::Relation)
expect(assigns(:pinned_links)).to be_an(ActiveRecord::Relation)
expect(assigns(:achievements)).to be_an(ActiveRecord::Relation)
expect(controller.instance_variable_get(:@user)).to eq(user)
expect(controller.instance_variable_get(:@links)).to be_an(ActiveRecord::Relation)
expect(controller.instance_variable_get(:@pinned_links)).to be_an(ActiveRecord::Relation)
expect(controller.instance_variable_get(:@achievements)).to be_an(ActiveRecord::Relation)
end
end

Expand All @@ -88,4 +88,4 @@
expect(response).to redirect_to(link.url)
end
end
end
end
9 changes: 1 addition & 8 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
require 'devise'
require 'factory_bot_rails'
require 'capybara/rspec'
require 'rails-controller-testing'

Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }

Expand All @@ -26,12 +25,6 @@
config.include Devise::Test::IntegrationHelpers, type: :request
config.include Devise::Test::ControllerHelpers, type: :controller
config.include Devise::Test::ControllerHelpers, type: :view

[:controller, :view, :request].each do |type|
config.include ::Rails::Controller::Testing::TestProcess, :type => type
config.include ::Rails::Controller::Testing::TemplateAssertions, :type => type
config.include ::Rails::Controller::Testing::Integration, :type => type
end

config.include FactoryBot::Syntax::Methods

Expand Down Expand Up @@ -63,4 +56,4 @@
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end

Capybara.javascript_driver = :chrome_headless
Capybara.javascript_driver = :chrome_headless
Loading