diff --git a/app/liquid_tags/raw_tag.rb b/app/liquid_tags/raw_tag.rb index 54a327737a13..5c0a63324df8 100644 --- a/app/liquid_tags/raw_tag.rb +++ b/app/liquid_tags/raw_tag.rb @@ -1,7 +1,7 @@ module Liquid class Raw < Block remove_const(:FullTokenPossiblyInvalid) if defined?(FullTokenPossiblyInvalid) - FullTokenPossiblyInvalid = /\A(.*)#{TagStart}\s*(\w+)\s*#{TagEnd}\z/om # rubocop:disable Naming/ConstantName + FullTokenPossiblyInvalid = /\A(.*)#{TagStart}\s*(\w+)\s*#{TagEnd}\z/om.freeze # rubocop:disable Naming/ConstantName end Template.register_tag("raw", Raw) diff --git a/spec/features/user_logs_in_with_twitter_spec.rb b/spec/features/user_logs_in_with_twitter_spec.rb index 3785aed7cfa5..59fe6bf64d25 100644 --- a/spec/features/user_logs_in_with_twitter_spec.rb +++ b/spec/features/user_logs_in_with_twitter_spec.rb @@ -1,4 +1,4 @@ -require 'rails_helper' +require "rails_helper" def user_grants_authorization_on_twitter_popup(twitter_callback_hash) OmniAuth.config.add_mock(:twitter, twitter_callback_hash) @@ -8,32 +8,32 @@ def user_do_not_grants_authorization_on_twitter_popup OmniAuth.config.mock_auth[:twitter] = :invalid_credentials end -RSpec.feature "Authenticating with twitter" do +RSpec.describe "Authenticating with twitter" do let(:twitter_callback_hash) do { - :provider => 'twitter', - :uid => '111111', - :credentials => { - :token => "222222", - :secret => "333333" + provider: "twitter", + uid: "111111", + credentials: { + token: "222222", + secret: "333333" }, - :extra => { - :access_token => "", - :raw_info => { - :name => "Bruce Wayne", - :created_at => "Thu Jul 4 00:00:00 +0000 2013", # This is mandatory + extra: { + access_token: "", + raw_info: { + name: "Bruce Wayne", + created_at: "Thu Jul 4 00:00:00 +0000 2013", # This is mandatory } }, - :info => { - :nickname => "batman", - :name => "Bruce Wayne", - :email => "batman@batcave.com", + info: { + nickname: "batman", + name: "Bruce Wayne", + email: "batman@batcave.com" } } end context "when user is new on dev.to" do - scenario "logging in with twitter using valid credentials" do + it "logging in with twitter using valid credentials" do user_grants_authorization_on_twitter_popup(twitter_callback_hash) visit root_path @@ -43,7 +43,7 @@ def user_do_not_grants_authorization_on_twitter_popup expect(page).to have_link("Welcome Thread") end - scenario "logging in with twitter using invalid credentials" do + it "logging in with twitter using invalid credentials" do user_do_not_grants_authorization_on_twitter_popup visit root_path