Commit ba7cf296 by Agustin Cavilliotti Committed by Jon Yurek

Taking care of @houndci comments, but not sure to which line specificaly is referring too :)

parent e4c04c2e
...@@ -31,8 +31,8 @@ describe 'Attachment Registry' do ...@@ -31,8 +31,8 @@ describe 'Attachment Registry' do
it 'calls the block with the class, attachment name, and options' do it 'calls the block with the class, attachment name, and options' do
foo = Class.new foo = Class.new
expected_accumulations = [ expected_accumulations = [
[foo, :avatar, { yo: 'greeting' }], [foo, :avatar, { yo: "greeting" }],
[foo, :greeter, { ciao: 'greeting' }] [foo, :greeter, { ciao: "greeting" }]
] ]
expected_accumulations.each do |args| expected_accumulations.each do |args|
Paperclip::AttachmentRegistry.register(*args) Paperclip::AttachmentRegistry.register(*args)
...@@ -50,19 +50,19 @@ describe 'Attachment Registry' do ...@@ -50,19 +50,19 @@ describe 'Attachment Registry' do
context '.definitions_for' do context '.definitions_for' do
it 'produces the attachment name and options' do it 'produces the attachment name and options' do
expected_definitions = { expected_definitions = {
avatar: { yo: 'greeting' }, avatar: { yo: "greeting" },
greeter: { ciao: 'greeting' } greeter: { ciao: "greeting" }
} }
foo = Class.new foo = Class.new
Paperclip::AttachmentRegistry.register( Paperclip::AttachmentRegistry.register(
foo, foo,
:avatar, :avatar,
{ yo: 'greeting' } yo: "greeting"
) )
Paperclip::AttachmentRegistry.register( Paperclip::AttachmentRegistry.register(
foo, foo,
:greeter, :greeter,
{ ciao: 'greeting' } ciao: "greeting"
) )
definitions = Paperclip::AttachmentRegistry.definitions_for(foo) definitions = Paperclip::AttachmentRegistry.definitions_for(foo)
...@@ -71,7 +71,7 @@ describe 'Attachment Registry' do ...@@ -71,7 +71,7 @@ describe 'Attachment Registry' do
end end
it 'produces defintions for subclasses' do it 'produces defintions for subclasses' do
expected_definitions = { avatar: { yo: 'greeting' } } expected_definitions = { avatar: { yo: "greeting" } }
foo = Class.new foo = Class.new
bar = Class.new(foo) bar = Class.new(foo)
Paperclip::AttachmentRegistry.register( Paperclip::AttachmentRegistry.register(
...@@ -86,12 +86,12 @@ describe 'Attachment Registry' do ...@@ -86,12 +86,12 @@ describe 'Attachment Registry' do
end end
it 'produces defintions for subclasses but deep merging them' do it 'produces defintions for subclasses but deep merging them' do
foo_definitions = { avatar: { yo: 'greeting' } } foo_definitions = { avatar: { yo: "greeting" } }
bar_definitions = { avatar: { ciao: 'greeting' } } bar_definitions = { avatar: { ciao: "greeting" } }
expected_definitions = { expected_definitions = {
avatar: { avatar: {
yo: 'greeting', yo: "greeting",
ciao: 'greeting' ciao: "greeting"
} }
} }
foo = Class.new foo = Class.new
...@@ -118,7 +118,7 @@ describe 'Attachment Registry' do ...@@ -118,7 +118,7 @@ describe 'Attachment Registry' do
foo = Class.new foo = Class.new
Paperclip::AttachmentRegistry.register(foo, Paperclip::AttachmentRegistry.register(foo,
:greeter, :greeter,
{ ciao: 'greeting' }) { ciao: "greeting" })
Paperclip::AttachmentRegistry.clear Paperclip::AttachmentRegistry.clear
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment