diff --git a/middleman-core/features/gzip.feature b/middleman-core/features/gzip.feature index 93955a49..18669476 100644 --- a/middleman-core/features/gzip.feature +++ b/middleman-core/features/gzip.feature @@ -1,4 +1,3 @@ -@nowindows Feature: GZIP assets during build Scenario: Built assets should be gzipped @@ -10,8 +9,7 @@ Feature: GZIP assets during build | build/javascripts/test.js.gz | | build/stylesheets/test.css | | build/stylesheets/test.css.gz | - When I run `file build/javascripts/test.js.gz` - Then the output should contain "gzip" + And build/javascripts/test.js.gz should be binary Scenario: Preview server doesn't change Given the Server is running at "gzip-app" diff --git a/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb b/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb index eda6467b..ce942284 100644 --- a/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb +++ b/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb @@ -71,3 +71,7 @@ end Then /^the file "([^"]*)" should contain '([^']*)'$/ do |file, partial_content| check_file_content(file, partial_content, true) end + +And /(.*) should be binary/ do |file| + expect(File.binread(File.join(current_dir, file), 2)).to eq(['1F8B'].pack('H*')) +end