Permalink
Browse files

Add cucumber tags

  • Loading branch information...
yterajima committed Jun 7, 2015
1 parent 97c4d5b commit d792e0f5754a6012145e18bfe42133c0e9ed784d
Showing with 68 additions and 1 deletion.
  1. +8 −1 Rakefile
  2. +60 −0 features/remover.feature
View
@@ -1,8 +1,15 @@
require "bundler/gem_tasks"
require "middleman-core/version"
task default: :test
desc "test command"
task :test do
sh 'cucumber features/'
version = ::Middleman::VERSION
if /^4\./ =~ ::Middleman::VERSION
sh 'cucumber --tags ~@v3 features/'
else
sh 'cucumber --tags ~@v4 features/'
end
end
View
@@ -108,6 +108,30 @@ Feature: Middleman-Remover
When I cd to "build"
Then a directory named "dir" should not exist
@v3
Scenario: Remove file with WILDCARD
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
configure :build do
activate :remover, :paths => %w(dir/*)
end
"""
And a directory named "source/dir"
And a file named "source/dir/empty" with:
"""
"""
And a file named "source/dir/something.html" with:
"""
<html><head><title>something</title></head><body></body></html>
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then a directory named "dir" should exist
And a file named "dir/empty" should not exist
And a file named "dir/something.html" should not exist
@v4
Scenario: Remove file with WILDCARD
Given a fixture app "basic-app"
And a file named "config.rb" with:
@@ -152,6 +176,42 @@ Feature: Middleman-Remover
And a file named "dir/empty" should exist
And a file named "dir/something.html" should not exist
@v3
Scenario: Remove Some files/Directories
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
configure :build do
activate :remover, :paths => %w(dir1/*.html dir2/*.dat /dir3)
end
"""
And a directory named "source/dir1"
And a directory named "source/dir2"
And a directory named "source/dir3"
And a file named "source/dir1/empty" with:
"""
"""
And a file named "source/dir1/something.html" with:
"""
<html><head><title>something</title></head><body></body></html>
"""
And a file named "source/dir2/sample.dat" with:
"""
sample
"""
And a file named "source/dir3/empty" with:
"""
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then a directory named "dir1" should exist
And a directory named "dir2" should exist
And a directory named "dir3" should not exist
And a file named "dir1/empty" should exist
And a file named "dir1/something.html" should not exist
And a file named "dir2/sample.dat" should not exist
@v4
Scenario: Remove Some files/Directories
Given a fixture app "basic-app"
And a file named "config.rb" with:

0 comments on commit d792e0f

Please sign in to comment.