Feature: Generating SVG clowncars during preview mode Scenario: Basic command Given a fixture app "automatic-clowncar-app" And a file named "source/testfile.html.erb" with: """ <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/" %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg | Then the following files should exist: | testfile.html | | photos/test-image.jpg | | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain " { :small => 200, :medium => 400, :large => 600 }, :namespace_directory => %w(photos) activate :asset_host, :host => "http://localhost:4567/" """ And a file named "source/testfile.html.erb" with: """ <%= automatic_clowncar_tag "photos/test-image.jpg" %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg Then the following files should exist: | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain " "http://localhost:4567/", :fallback => true %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg Then the following files should exist: | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain "" And the file "testfile.html" should contain '' And the file "testfile.html" should contain "" Scenario: With prevent_upscaling Given a fixture app "automatic-clowncar-app" And a file named "source/testfile.html.erb" with: """ <%= automatic_clowncar_tag "photos/test-image.jpg", :host => "http://localhost:4567/", :prevent_upscaling => true %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg Then the following files should exist: | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain " "http://localhost:4567/", :include_original => true %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg | Then the following files should exist: | photos/test-image.jpg | | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain " { :small => 200, :medium => 400, :huge => 3000 }, :namespace_directory => %w(photos) activate :asset_host, :host => "http://localhost:4567/" """ And a file named "source/testfile.html.erb" with: """ <%= automatic_clowncar_tag "photos/test-image.jpg" %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" Then the following files should not exist: | photos/test-image/test-image-huge.jpg | Then the following files should exist: | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | Then the file "testfile.html" should contain " { :small => 200, :medium => 400, :large => 600 }, :namespace_directory => %w(photos), :include_originals => true activate :asset_host, :host => "http://localhost:4567/" """ And a file named "source/testfile.html.erb" with: """ <%= automatic_clowncar_tag "photos/test-image.jpg" %> """ Given a successfully built app at "automatic-clowncar-app" with flags "--verbose" When I cd to "build" #Then the following files should not exist: # | photos/test-image.jpg | Then the following files should exist: | photos/test-image.jpg | | photos/test-image/test-image-small.jpg | | photos/test-image/test-image-medium.jpg | | photos/test-image/test-image-large.jpg | Then the file "testfile.html" should contain "