Skip to content

Commit b173726

Browse files
committed
Merge pull request artemave#22 from andyw8/long-paths-migration
Migration to add support for long pathnames (> 255 characters)
2 parents 1636d91 + 6c97392 commit b173726

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class ChangeFullpathToText < ActiveRecord::Migration
2+
def self.up
3+
change_column :doubles, :fullpath, :text
4+
end
5+
6+
def self.down
7+
change_column :doubles, :fullpath, :string
8+
end
9+
end

spec/models/double_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ module RestAssured::Models
8686
f3.reload.active.should be true
8787
f4.reload.active.should be true
8888
end
89+
90+
it "handles long paths (more than 255 characters)" do
91+
long_path = 'a' * 260
92+
f1 = Double.create valid_params.merge(:fullpath => long_path)
93+
f1.reload.save
94+
f1.reload.fullpath.should == long_path
95+
end
8996
end
9097

9198
describe 'when destroying' do

0 commit comments

Comments
 (0)