Skip to content

Commit

Permalink
Rubocop fixes (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
lightalloy authored and benhalpern committed Jan 14, 2019
1 parent aecb040 commit 8610d50
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion 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)
Expand Down
36 changes: 18 additions & 18 deletions 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)
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8610d50

Please sign in to comment.