Skip to content
Closed
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
6 changes: 3 additions & 3 deletions spec/rails/add_application_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
let(:test_rewritten_content) { <<~EOS }
class ApplicationJob < ActiveJob::Base
end
EOS
EOS

include_examples 'convertable'
end
Expand All @@ -21,12 +21,12 @@ class ApplicationJob < ActiveJob::Base
let(:test_content) { <<~EOS }
class PostJob < ActiveJob::Base
end
EOS
EOS

let(:test_rewritten_content) { <<~EOS }
class PostJob < ApplicationJob
end
EOS
EOS

include_examples 'convertable'
end
Expand Down
6 changes: 3 additions & 3 deletions spec/rails/add_application_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
EOS
EOS

include_examples 'convertable'
end
Expand All @@ -22,12 +22,12 @@ class ApplicationRecord < ActiveRecord::Base
let(:test_content) { <<~EOS }
class Post < ActiveRecord::Base
end
EOS
EOS

let(:test_rewritten_content) { <<~EOS }
class Post < ApplicationRecord
end
EOS
EOS

include_examples 'convertable'
end
Expand Down
6 changes: 3 additions & 3 deletions spec/rails/convert_active_record_dirty_5_0_to_5_1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
t.timestamps
end
end
EOS
EOS
let(:test_content) { <<~EOS }
class Post < ActiveRecord::Base
before_create :call_before_create
Expand All @@ -41,7 +41,7 @@ def call_after_create
end
end
end
EOS
EOS
let(:test_rewritten_content) { <<~EOS }
class Post < ActiveRecord::Base
before_create :call_before_create
Expand All @@ -68,7 +68,7 @@ def call_after_create
end
end
end
EOS
EOS

before do
FakeFS() do
Expand Down
4 changes: 2 additions & 2 deletions spec/rails/convert_render_text_to_render_plain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def bar
render text: 'Not OK', status: 403
end
end
EOS
EOS
let(:test_rewritten_content) { <<~EOS }
class PostsController < ApplicationController
def foo
Expand All @@ -26,7 +26,7 @@ def bar
render plain: 'Not OK', status: 403
end
end
EOS
EOS

include_examples 'convertable'
end
2 changes: 1 addition & 1 deletion spec/rails/upgrade_3_0_to_3_1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
EOS
EOS

let(:session_store_content) {
"
Expand Down
4 changes: 2 additions & 2 deletions spec/ruby/new_2_2_hash_syntax_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
{ :"foo-#{key}" => 'foo_value', :"bar-key" => 42, :"a\tb" => false, :"c'd" => nil }
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
EOS
EOS

let(:test_rewritten_content) { <<~'EOS' }
{ foo: 'bar', 'foo' => 'bar' }
{ key1: 'value1', key2: 'value2' }
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
EOS
EOS

before do
load_sub_snippets(%w[ruby/new_1_9_hash_syntax])
Expand Down