Permalink
Browse files

Make autogenerated steps raise an exception

  • Loading branch information...
1 parent bce77eb commit e9f80a576bdcccae3d869bdc253c8f4afb48358a @josepjaume josepjaume committed Oct 22, 2011
Showing with 5 additions and 0 deletions.
  1. +1 −0 bin/spinach
  2. +1 −0 lib/spinach/generators/step_generator.rb
  3. +3 −0 test/spinach/generators/feature_generator_test.rb
View
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+require "bundler/setup" rescue nil
begin
require 'spinach'
@@ -15,6 +15,7 @@ def initialize(data)
def generate
result = StringIO.new
result.puts "#{@data['keyword']} '#{Spinach::Support.escape_single_commas @data['name']}' do"
+ result.puts " raise 'step not implemented'"
result.puts "end"
result.string
end
@@ -75,6 +75,9 @@ module Spinach::Generators
klass = eval(result)
feature_runner = Spinach::Runner::FeatureRunner.new(stub_everything)
feature_runner.stubs(data: data)
+ error_count = 0
+ CheezburgerCanIHas.any_instance.
+ expects(:raise).with("step not implemented").times(6).returns(nil)
feature_runner.run.must_equal true
end
end

0 comments on commit e9f80a5

Please sign in to comment.