Permalink
Browse files

Clean up some features

  • Loading branch information...
1 parent d5dfc88 commit 925d599d47ffe309fa4d8a56f213acbc2028de3c @joshuaclayton committed Nov 3, 2010
Showing with 20 additions and 44 deletions.
  1. +20 −24 features/cli.feature
  2. +0 −12 features/fixtures/schemes/valid_scheme
  3. +0 −8 features/support/env.rb
View
@@ -3,30 +3,10 @@ Feature: Run palette from the command line
As a user of palette
I should be able to point palette to a file to generate a color schem
- Scenario: Process a file with valid palette syntax
- When I run "palette features/fixtures/schemes/valid_scheme"
- Then the output should contain "colors_name"
-
- Scenario: Process a nonexistant file
- When I run "palette features/fixtures/schemes/missing_scheme"
- Then the output should not contain "colors_name"
- And the exit status should be 0
-
- Scenario: Process a file with invalid palette syntax
- Given a file named "features/fixtures/schemes/invalid_scheme" with:
- """
- vim_colors "bad syntax" do
- totally made up junk
- end
- """
- When I run "palette features/fixtures/schemes/invalid_scheme"
- Then the exit status should be 1
- And the output should contain "Please check the syntax of your palette file"
-
Scenario: Process a complete valid file
- Given a file named "great_scheme" with:
+ Given a file named "valid_scheme" with:
"""
- vim_colors "great_scheme" do
+ vim_colors "valid_scheme" do
author "Josh Clayton"
notes "This is a pretty simple example"
reset true
@@ -40,7 +20,7 @@ Feature: Run palette from the command line
link :rubyDelimiter, :rubyInterpolationDelimiter, :to => :String
end
"""
- When I run "palette great_scheme"
+ When I run "palette valid_scheme"
Then the output should contain:
"""
" Vim color file
@@ -50,7 +30,7 @@ Feature: Run palette from the command line
" Author: Josh Clayton
" Notes: This is a pretty simple example
- let colors_name="great_scheme"
+ let colors_name="valid_scheme"
hi clear
if version > 580
@@ -69,3 +49,19 @@ Feature: Run palette from the command line
hi link rubyDelimiter String
hi link rubyInterpolationDelimiter String
"""
+
+ Scenario: Process a nonexistant file
+ When I run "palette missing_scheme"
+ Then the output should not contain "colors_name"
+ And the exit status should be 0
+
+ Scenario: Process a file with invalid palette syntax
+ Given a file named "invalid_scheme" with:
+ """
+ vim_colors "bad syntax" do
+ totally made up junk
+ end
+ """
+ When I run "palette invalid_scheme"
+ Then the exit status should be 1
+ And the output should contain "Please check the syntax of your palette file"
@@ -1,12 +0,0 @@
-vim_colors "sweet" do
- author "Josh Clayton"
- notes "My really sweet theme"
-
- reset true
- background :light
-
- Normal "222", "f8f8ff"
-
- Folded "808080", "ECECEC", :gui => "bold"
- link :vimFold, :FoldColumn, :to => :Folded
-end
View
@@ -1,11 +1,3 @@
Bundler.require
require "aruba"
-
-Before do
- schemes_origin_dir = File.join(%w(features fixtures schemes))
- schemes_dir = File.join(dirs.first, schemes_origin_dir)
-
- FileUtils.mkdir_p(schemes_dir)
- FileUtils.cp(Dir.glob(File.join(schemes_origin_dir, "*")), schemes_dir)
-end

0 comments on commit 925d599

Please sign in to comment.