Sha256: 48389a74ca46b2e29839e6b0df4d4be277567705ecd8ea6dd7c63c1d42a12df8

Contents?: true

Size: 669 Bytes

Versions: 53

Compression:

Stored size: 669 Bytes

Contents

Given /^an album "(.+)" with attached file "(.+)"$/ do |name, filename|
  Album.create! :name => name, :cover_image => Rails.root.join('../../../samples', filename)
end

When /^I look at the generated image$/ do
  page.body =~ %r{src="(/media[^"]+?)"}
  url = $1
  visit(url)
end

When /^I look at the original image$/ do
  page.body =~ %r{src="(/system[^"]+?)"}
  url = $1
  visit(url)
end

Then /^I should see a (.+) image of size (.+)$/ do |format, size|
  tempfile = Tempfile.new('wicked')
  tempfile.binmode
  tempfile.write page.source
  tempfile.close
  output = `identify #{tempfile.path}`.split(' ')
  output[1].should == format
  output[2].should == size
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.7.2 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.7.1 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.7.0 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
dragonfly-0.9.15 fixtures/rails/files/features/step_definitions/image_steps.rb
dragonfly-0.9.14 fixtures/rails/files/features/step_definitions/image_steps.rb
dragonfly-0.9.13 fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.9 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.8 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.7 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.6 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.5 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.4 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.3 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.2 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.1 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.6.0 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb
classiccms-0.5.17 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/step_definitions/image_steps.rb