Skip to content

Commit

Permalink
Fixes @oriolgual finickyness
Browse files Browse the repository at this point in the history
  • Loading branch information
josepjaume committed Oct 11, 2011
1 parent dca7196 commit 131a133
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 8 additions & 6 deletions features/steps/automatic_feature_generation.rb
Expand Up @@ -16,15 +16,17 @@
Then 'I a feature should exist named "features/steps/cheezburger_can_i_has.rb"' do
stop_processes!
in_current_dir do
file = 'features/steps/cheezburger_can_i_has.rb'
File.exists?(file).must_equal true
@content = File.read(file)
@file = 'features/steps/cheezburger_can_i_has.rb'
File.exists?(@file).must_equal true
end
end

And "that feature should have the example feature steps" do
@content.must_include "I haz a sad"
@content.must_include "I get some lulz"
@content.must_include "I haz a happy"
in_current_dir do
content = File.read(@file)
content.must_include "I haz a sad"
content.must_include "I get some lulz"
content.must_include "I haz a happy"
end
end
end
3 changes: 3 additions & 0 deletions lib/spinach/generators.rb
Expand Up @@ -11,6 +11,9 @@ def self.bind
end

# Generates a feature given a parsed feature data
#
# @param [Hash] data
# the parsed feature data
def self.generate_feature(data)
FeatureGenerator.new(data).store
rescue FeatureGeneratorException => e
Expand Down

0 comments on commit 131a133

Please sign in to comment.