Commit ad23a0f8 by Jordan Jennings Committed by Jon Yurek

Addressing issue #1593, removing calls to rebuild class

parent d8701fb5
...@@ -24,7 +24,6 @@ describe Paperclip::Schema do ...@@ -24,7 +24,6 @@ describe Paperclip::Schema do
t.has_attached_file :avatar t.has_attached_file :avatar
end end
end end
rebuild_class
columns = Dummy.columns.map{ |column| [column.name, column.type] } columns = Dummy.columns.map{ |column| [column.name, column.type] }
...@@ -48,7 +47,6 @@ describe Paperclip::Schema do ...@@ -48,7 +47,6 @@ describe Paperclip::Schema do
Dummy.connection.create_table :dummies, force: true do |t| Dummy.connection.create_table :dummies, force: true do |t|
t.attachment :avatar t.attachment :avatar
end end
rebuild_class
end end
it "creates attachment columns" do it "creates attachment columns" do
...@@ -71,7 +69,6 @@ describe Paperclip::Schema do ...@@ -71,7 +69,6 @@ describe Paperclip::Schema do
context "with single attachment" do context "with single attachment" do
before do before do
Dummy.connection.add_attachment :dummies, :avatar Dummy.connection.add_attachment :dummies, :avatar
rebuild_class
end end
it "creates attachment columns" do it "creates attachment columns" do
...@@ -87,7 +84,6 @@ describe Paperclip::Schema do ...@@ -87,7 +84,6 @@ describe Paperclip::Schema do
context "with multiple attachments" do context "with multiple attachments" do
before do before do
Dummy.connection.add_attachment :dummies, :avatar, :photo Dummy.connection.add_attachment :dummies, :avatar, :photo
rebuild_class
end end
it "creates attachment columns" do it "creates attachment columns" do
...@@ -108,7 +104,6 @@ describe Paperclip::Schema do ...@@ -108,7 +104,6 @@ describe Paperclip::Schema do
it "raises an error" do it "raises an error" do
assert_raises ArgumentError do assert_raises ArgumentError do
Dummy.connection.add_attachment :dummies Dummy.connection.add_attachment :dummies
rebuild_class
end end
end end
end end
...@@ -132,7 +127,6 @@ describe Paperclip::Schema do ...@@ -132,7 +127,6 @@ describe Paperclip::Schema do
ActiveSupport::Deprecation.silence do ActiveSupport::Deprecation.silence do
Dummy.connection.drop_attached_file :dummies, :avatar Dummy.connection.drop_attached_file :dummies, :avatar
end end
rebuild_class
columns = Dummy.columns.map{ |column| [column.name, column.type] } columns = Dummy.columns.map{ |column| [column.name, column.type] }
...@@ -153,7 +147,6 @@ describe Paperclip::Schema do ...@@ -153,7 +147,6 @@ describe Paperclip::Schema do
context "with single attachment" do context "with single attachment" do
before do before do
Dummy.connection.remove_attachment :dummies, :avatar Dummy.connection.remove_attachment :dummies, :avatar
rebuild_class
end end
it "removes the attachment columns" do it "removes the attachment columns" do
...@@ -176,7 +169,6 @@ describe Paperclip::Schema do ...@@ -176,7 +169,6 @@ describe Paperclip::Schema do
end end
Dummy.connection.remove_attachment :dummies, :avatar, :photo Dummy.connection.remove_attachment :dummies, :avatar, :photo
rebuild_class
end end
it "removes the attachment columns" do it "removes the attachment columns" do
......
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