@@ -14,11 +14,7 @@ Feature: Rails integration
14
14
"""
15
15
config.paperclip_defaults = {:url => "/paperclip/custom/:attachment/:style/:filename"}
16
16
"""
17
- Given I add this snippet to the User model:
18
- """
19
- attr_accessible :name, :attachment if Rails::VERSION::MAJOR < 4
20
- has_attached_file :attachment
21
- """
17
+ And I attach :attachment
22
18
And I start the rails application
23
19
When I go to the new user page
24
20
And I fill in "Name" with "something"
@@ -29,10 +25,9 @@ Feature: Rails integration
29
25
And the file at "/paperclip/custom/attachments/original/5k.png" should be the same as "test/fixtures/5k.png"
30
26
31
27
Scenario : Filesystem integration test
32
- Given I add this snippet to the User model :
28
+ Given I attach :attachment with :
33
29
"""
34
- attr_accessible :name, :attachment if Rails::VERSION::MAJOR < 4
35
- has_attached_file :attachment, :url => "/system/:attachment/:style/:filename"
30
+ :url => "/system/:attachment/:style/:filename"
36
31
"""
37
32
And I start the rails application
38
33
When I go to the new user page
@@ -44,14 +39,12 @@ Feature: Rails integration
44
39
And the file at "/system/attachments/original/5k.png" should be the same as "test/fixtures/5k.png"
45
40
46
41
Scenario : S3 Integration test
47
- Given I add this snippet to the User model :
42
+ Given I attach :attachment with :
48
43
"""
49
- attr_accessible :name, :attachment if Rails::VERSION::MAJOR < 4
50
- has_attached_file :attachment,
51
- :storage => :s3,
52
- :path => "/:attachment/:style/:filename",
53
- :s3_credentials => Rails.root.join("config/s3.yml"),
54
- :styles => { :square => "100x100#" }
44
+ :storage => :s3,
45
+ :path => "/:attachment/:style/:filename",
46
+ :s3_credentials => Rails.root.join("config/s3.yml"),
47
+ :styles => { :square => "100x100#" }
55
48
"""
56
49
And I write to "config/s3.yml" with:
57
50
"""
0 commit comments