Commit 1a9fb2cc by Jon Yurek

Move fixtures to spec/support/fixtures

parent c9e3df3f
......@@ -18,11 +18,11 @@ Feature: Rails integration
And I start the rails application
When I go to the new user page
And I fill in "Name" with "something"
And I attach the file "spec/fixtures/5k.png" to "Attachment"
And I attach the file "spec/support/fixtures/5k.png" to "Attachment"
And I press "Submit"
Then I should see "Name: something"
And I should see an image with a path of "/paperclip/custom/attachments/original/5k.png"
And the file at "/paperclip/custom/attachments/original/5k.png" should be the same as "spec/fixtures/5k.png"
And the file at "/paperclip/custom/attachments/original/5k.png" should be the same as "spec/support/fixtures/5k.png"
Scenario: Filesystem integration test
Given I attach :attachment with:
......@@ -32,11 +32,11 @@ Feature: Rails integration
And I start the rails application
When I go to the new user page
And I fill in "Name" with "something"
And I attach the file "spec/fixtures/5k.png" to "Attachment"
And I attach the file "spec/support/fixtures/5k.png" to "Attachment"
And I press "Submit"
Then I should see "Name: something"
And I should see an image with a path of "/system/attachments/original/5k.png"
And the file at "/system/attachments/original/5k.png" should be the same as "spec/fixtures/5k.png"
And the file at "/system/attachments/original/5k.png" should be the same as "spec/support/fixtures/5k.png"
Scenario: S3 Integration test
Given I attach :attachment with:
......@@ -55,7 +55,7 @@ Feature: Rails integration
And I start the rails application
When I go to the new user page
And I fill in "Name" with "something"
And I attach the file "spec/fixtures/5k.png" to "Attachment" on S3
And I attach the file "spec/support/fixtures/5k.png" to "Attachment" on S3
And I press "Submit"
Then I should see "Name: something"
And I should see an image with a path of "http://s3.amazonaws.com/paperclip/attachments/original/5k.png"
......
module AttachmentHelpers
def fixture_path(filename)
File.expand_path("#{PROJECT_ROOT}/spec/fixtures/#{filename}")
File.expand_path("#{PROJECT_ROOT}/spec/support/fixtures/#{filename}")
end
def attachment_path(filename)
......
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